Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MAINT: SciPy 1.11.3 backports/prep #19279

Merged
merged 33 commits into from
Sep 27, 2023

Commits on Sep 21, 2023

  1. BUG: add infeasibility checks to min_weight_full_bipartite_matching

    The algorithm is already equipped with a handful of checks for
    problem infeasibility, but the tests added here show two different
    examples that were not caught by any of those checks. It is likely
    possible to dive in and determine infeasibility in `_lapjvsp` itself, as
    in both examples, the symptom is the algorithm hitting an infinite loop
    (but a different infinite loop for each case), but here we simply add
    the catch-all fix of checking that the problem is feasible before even
    trying to solve it. This does come with a performance hit, but at least
    the implementation of Hopcroft--Karp that we're using is fast.
    fuglede authored and tylerjereddy committed Sep 21, 2023
    Configuration menu
    Copy the full SHA
    cbe36bf View commit details
    Browse the repository at this point in the history
  2. MAINT: specify expected error message in test

    Co-authored-by: Jake Bowhay <60778417+j-bowhay@users.noreply.github.com>
    2 people authored and tylerjereddy committed Sep 21, 2023
    Configuration menu
    Copy the full SHA
    48368fd View commit details
    Browse the repository at this point in the history
  3. BUG: sparse.csgraph: Support int64 indices in traversal.pyx (scipy#18913

    )
    
    Closes scipygh-18716
    
    Co-authored-by: Julien Jerphanion <git@jjerphan.xyz>
    2 people authored and tylerjereddy committed Sep 21, 2023
    Configuration menu
    Copy the full SHA
    2321c60 View commit details
    Browse the repository at this point in the history
  4. BUG: trust-constr Bounds exclusive

    Closes scipy#15093
    The scipy docs define Bounds as inclusive but trust-constr treats
    bounds as exclusive. According to Nocedal, Jorge, and Stephen J.
    Wright. "Numerical optimization" Second Edition (2006), p. 393,
    interior point methods necessarily treat bounds as exclusive. To work
    around this limitation of interior point methods and create consistent
    behavior for Bounds, this PR modifies trust-constr so that Bounds
    passed to trust-constr are expanded by epsilon.
    ellieLitwack authored and tylerjereddy committed Sep 21, 2023
    Configuration menu
    Copy the full SHA
    c349999 View commit details
    Browse the repository at this point in the history
  5. BUG: Update assert

    Switched from using assert_ to using assert.
    ellieLitwack authored and tylerjereddy committed Sep 21, 2023
    Configuration menu
    Copy the full SHA
    e8badb4 View commit details
    Browse the repository at this point in the history
  6. MAINT: assert is not a function

    andyfaff authored and tylerjereddy committed Sep 21, 2023
    Configuration menu
    Copy the full SHA
    3692d70 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    b4861c9 View commit details
    Browse the repository at this point in the history
  8. BUG: Fixes scipy#19103 by adding back make_strictly_feasible to lsq trf.

    PR scipy#18896 removed make_strictly_feasible because it makes solutions
    worse if they are close to the boundary.
    However, the downstream algorithm that eventually solves the
    optimization problem has some trouble with starting points that
    are on the boundaries of a bounded optimization problem.
    This either results in division by zero warnings, see scipy#19102,
    or in failure of finding the correct solution at all,
    which is added as a regression test in this commit.
    This PR brings back make_strictly_feasible but with the
    smallest possible step from the boundary a floating point allows
    by setting rstep=0 on the function make_strictly_feasible,
    which uses np.nextafter to find such a point, hereby respecting
    the strictly feasible point condition and minimizing boundary effects.
    See strictly feasible points in interior-point methods for more context
    https://nmayorov.wordpress.com/2015/06/19/trust-region-reflective-algorithm/
    hwalinga authored and tylerjereddy committed Sep 21, 2023
    Configuration menu
    Copy the full SHA
    8c41af9 View commit details
    Browse the repository at this point in the history
  9. BLD: Avoid absolute pathnames in .pyx files

    to allow for reproducible builds
    even when (unneeded) .pyx files are installed and shipped in OS packages
    
    Fixes: scipy#19101
    
    This patch was done while working on reproducible builds for openSUSE.
    bmwiedemann authored and tylerjereddy committed Sep 21, 2023
    Configuration menu
    Copy the full SHA
    a7023a4 View commit details
    Browse the repository at this point in the history
  10. MAINT: signal: Remove the cval parameter from the private function _p…

    …ad_test.
    
    The parameter `cval` in the private helper function `_pad_test` is not
    used, so remove it.  This change is inspired by a bug in Cython 3.0.1
    (see SciPy issue scipygh-19132), and this change is a work-around for that bug,
    but since the parameter is unused and in a private function, there is no
    need to revert this change.
    WarrenWeckesser authored and tylerjereddy committed Sep 21, 2023
    Configuration menu
    Copy the full SHA
    c25ff2f View commit details
    Browse the repository at this point in the history
  11. BLD: revert to using published wheels [wheel build] (scipy#19139)

    * BLD: revert to using published wheels [wheel build]
    andyfaff authored and tylerjereddy committed Sep 21, 2023
    Configuration menu
    Copy the full SHA
    0b5c55e View commit details
    Browse the repository at this point in the history
  12. BUG: Support sparse arrays in scipy.sparse.csgraph.laplacian (scipy#1…

    …9156)
    
    * BUG: Support sparse arrays in scipy.sparse.csgraph.laplacian
    
    * TST: Added unit test for laplacian
    bharatr21 authored and tylerjereddy committed Sep 21, 2023
    Configuration menu
    Copy the full SHA
    c0c398c View commit details
    Browse the repository at this point in the history
  13. BUG: signal: freqz rfft grid fix (scipy#19208)

    * TST: for issues scipy#17289 scipy#15273
    
    * BUG/ENH: fix scipy#17289 scipy#15273
    
    * TST: use correct assert
    
    * BENCH: Added a benchmark for signal.freqz
    
    * TST/BENCH: improved coverage scipy#17289 scipy#15273
    
    * BENCH: removed vectorized input scipy#17289 scipy#15273
    
    * STY: add missing whitespace
    
    [skip ci]
    
    ---------
    
    Co-authored-by: Jake Bowhay <60778417+j-bowhay@users.noreply.github.com>
    2 people authored and tylerjereddy committed Sep 21, 2023
    Configuration menu
    Copy the full SHA
    77d0ce2 View commit details
    Browse the repository at this point in the history
  14. DOC, MAINT: update relnotes and build

    * update the SciPy 1.11.3 release notes
    
    * update our wheel build config per feedback
    in scipygh-19274
    
    [skip cirrus]
    tylerjereddy committed Sep 21, 2023
    Configuration menu
    Copy the full SHA
    c388d9b View commit details
    Browse the repository at this point in the history
  15. DOC: fix for row_stack

    * fix a doc build failure related to `numpy.ma.row_stack`; should
    use `vstack` now re: NumPy namespace changes that are happening
    tylerjereddy committed Sep 21, 2023
    Configuration menu
    Copy the full SHA
    0410a67 View commit details
    Browse the repository at this point in the history
  16. Allow johnsonsu parameters to be floats

    Fixes scipy#18782 18782
    ColCarroll authored and tylerjereddy committed Sep 21, 2023
    Configuration menu
    Copy the full SHA
    857f1f1 View commit details
    Browse the repository at this point in the history
  17. MAINT, CI: fix linting + CI issue

    * `node_list` was already made private on `main` in `_traversal.pyx`,
    so just apply that fix here as well, to fix the linter error
    
    * pin `pythran` in gcc-8 GHA job, was causing problem in build
    with isolation disabled because `0.14.0` is now available
    tylerjereddy committed Sep 21, 2023
    Configuration menu
    Copy the full SHA
    26b534c View commit details
    Browse the repository at this point in the history
  18. TST: fix TestODR.test_implicit test failure with tolerance bump (sc…

    …ipy#19200)
    
    This was failing on macOS x86-64 in CI with:
    ```
     E   Arrays are not almost equal to 6 decimals
    E
    E   Mismatched elements: 1 / 25 (4%)
    E   Max absolute difference: 1.52291797e-06
    E   Max relative difference: 8.81522156e-07
    E    x: array([[ 2.108927e+00, -1.943767e+00,  7.026353e-02, -4.717525e-02,
    E            5.251554e-02],
    E          [-1.943767e+00,  2.048149e+00, -6.160049e-02,  4.626880e-02,...
    E    y: array([[ 2.108927e+00, -1.943769e+00,  7.026355e-02, -4.717527e-02,
    E            5.251558e-02],
    E          [-1.943769e+00,  2.048151e+00, -6.160052e-02,  4.626883e-02,...
    ```
    
    So it's a very small atol violation (1.52e-6, where decimal=6 implies
    1.5e-6). Rather than bump to `decimal=5`, I decided to change the test
    to `assert_allclose` so the bump could be smaller.
    
    [skip ci]
    rgommers authored and tylerjereddy committed Sep 21, 2023
    Configuration menu
    Copy the full SHA
    7866cb2 View commit details
    Browse the repository at this point in the history
  19. DOC: update 1.11.3 relnotes

    * update SciPy `1.11.3` release notes after more changes/backports
    
    [skip cirrus]
    tylerjereddy committed Sep 21, 2023
    Configuration menu
    Copy the full SHA
    c7f8884 View commit details
    Browse the repository at this point in the history
  20. CI: PR 19279 revisions

    * pin `meson-python` version in gcc-8 GHA job, because it has
    build isolation disabled
    
    [skip cirrus]
    tylerjereddy committed Sep 21, 2023
    Configuration menu
    Copy the full SHA
    b6bdcad View commit details
    Browse the repository at this point in the history

Commits on Sep 22, 2023

  1. Configuration menu
    Copy the full SHA
    41c072b View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    7a1e39b View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    3e19e9d View commit details
    Browse the repository at this point in the history
  4. DOC, TST: update 1.11.3 relnotes, test

    * update SciPy `1.11.3` release notes following
    more backports
    
    * `test_int_x0_gh19280()` required a small shim to
    deal with module import differences vs. `main`
    
    [skip cirrus]
    tylerjereddy committed Sep 22, 2023
    Configuration menu
    Copy the full SHA
    1ffc297 View commit details
    Browse the repository at this point in the history

Commits on Sep 26, 2023

  1. MAINT: fix libquadmath licence (scipy#19299)

    * MAINT: linux amendments
    
    * MAINT: osx amendments
    
    * MAINT: win licence amendments
    
    * MAINT: licence typo
    andyfaff authored and tylerjereddy committed Sep 26, 2023
    Configuration menu
    Copy the full SHA
    ecc2ff2 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    4e365bb View commit details
    Browse the repository at this point in the history
  3. BUG: stats: remove use of BOOST_MATH_DECLARE_SPECIAL_FUNCTIONS

    This macro must not be used in the global scope, but rather in
    a separate namespace (see, e.g., `boost_math/example/policy_eg_9.cpp`).
    It caused compilation errors with Clang on Windows in
    PR 246 on the conda-forge scipy feedback.
    
    This bit of code also did not seem necessary, given that these
    compile flags in `stats/_boost/meson.build` should already achieve
    the same effect:
    ```
      '-DBOOST_MATH_EVALUATION_ERROR_POLICY=user_error',
      '-DBOOST_MATH_OVERFLOW_ERROR_POLICY=user_error',
    ```
    
    That the custom error handling in `func_defs.hpp` is still used can
    be verified by running for example after modifying the
    `user_evaluation_error` handler:
    ```
    python dev.py test -t scipy.stats.tests.test_distributions -- -k test_boost_eval_issue_14606
    ```
    rgommers authored and tylerjereddy committed Sep 26, 2023
    Configuration menu
    Copy the full SHA
    6ff8024 View commit details
    Browse the repository at this point in the history
  4. BLD: add float.h include to _fpumode.c, fixes Clang on Windows issue

    Follow-up to scipygh-8918; the linked CPython code in the discussion
    on the issue that that PR closes has the same `<float.h>` include.
    
    This upstreams a patch from PR 246 to
    https://github.com/conda-forge/scipy-feedstock
    
    Co-authored-by: Uwe L. Korn <uwe.korn@quantco.com>
    2 people authored and tylerjereddy committed Sep 26, 2023
    Configuration menu
    Copy the full SHA
    c263d19 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    fd3b923 View commit details
    Browse the repository at this point in the history
  6. BUG: Fix python3.12 distutils dev.py build

    Fix scipygh-18689 scipygh-18922
    
    python3.12 removes distutils and scipy dev.py uses
    distutils for the meson based build in debian python.
    With python3.12 debian has patched sysconfig and no
    longer requires dependence on distutils.
    AnirudhDagar authored and tylerjereddy committed Sep 26, 2023
    Configuration menu
    Copy the full SHA
    6d09fc2 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    bdc57c1 View commit details
    Browse the repository at this point in the history
  8. DOC: update 1.11.3 relnotes

    * update the SciPy 1.11.3 release notes following
    another series of backports
    
    [skip cirrus]
    tylerjereddy committed Sep 26, 2023
    Configuration menu
    Copy the full SHA
    b430bf5 View commit details
    Browse the repository at this point in the history

Commits on Sep 27, 2023

  1. MAINT: PR 19279 [wheel build]

    * empty commit to test wheel builds for
    the SciPy `1.11.3` release process before
    the backport PR is merged
    
    [wheel build]
    tylerjereddy committed Sep 27, 2023
    Configuration menu
    Copy the full SHA
    8208cf6 View commit details
    Browse the repository at this point in the history