forked from scipy/scipy
-
Notifications
You must be signed in to change notification settings - Fork 2
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
Numpy2 #58
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[skip actions] [skip cirrus]
[skip actions] [skip cirrus]
[skip ci]
Co-authored-by: Tyler Reddy <[email protected]>
[skip cirrus] [skip circle]
[skip cirrus] [skip circle]
Closes scipy#17864. Add inverse Hessian estimate parameter `hk_init` in `_minimize_bfgs`. `hk_init` is checked to be positive definite and initializes `Hk` if not `None` else `Hk` is set to identity. Add unit-test to check non positive definite `hk_init` are not allowed.
Address comments to scipy#19095. See scipy#17864.
Removing `rtol` and `atol` from symmetric check in `_check_positive_definite`.
Adress comment on testing Co-authored-by: Daniel Schmitz <[email protected]>
remove double empty line bw `_check` functions Co-authored-by: Andrew Nelson <[email protected]>
Addressing line length and documentation comments.
…well as minimum-distance rotations for single vectors (scipy#17542) * ENH: Extend Rotation.align_vectors() to allow single-vector alignment and infinite weights * Docstring and comment tweaks * Error message fix * Minimize diff * Code review updates --------- Co-authored-by: Scott Shambaugh <[email protected]>
…9156) * BUG: Support sparse arrays in scipy.sparse.csgraph.laplacian * TST: Added unit test for laplacian
Closes scipygh-19117 The `test_sygst` one was reported in scipygh-19153.
DOC: stats.Covariance: fixed typo
… and root (scipy#19128) ENH: optimize: add method attribute to result object from root_scalar and root
[skip cirrus] [skip circle]
[skip cirrus] [skip circle]
TST: test tolerance bumps to fix reported failures
[skip cirrus] [skip circle]
[skip azp]
[skip cirrus] [skip circle]
BUG: accept `np`-coercible array-likes with array API flag set
…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]
All in title, this create parsing errors/incorrect docs. [skip ci]
DOC: missing backticks
…ves (scipy#19198) * DOC: optimize.minimize_scalar: note limitations and suggest alternatives [skip actions] [skip cirrus] * DOC: fix incorrect reference [skip actions] [skip cirrus] * Update scipy/optimize/_minimize.py [skip ci] --------- Co-authored-by: Jake Bowhay <[email protected]>
without the leading prompt this is interpreted as the result the previous line should produce.
…9184) * fix test with large memory footprint, `test_concatenate_int32_overflow`
* Fixes scipy#19190 * the module-level skipping described in the above issue was causing spurious skips in some cases as described there, so move the tests in that module to a class guarded with a `skipif` mark, which seems to be the preferred approach anyway according to: https://docs.pytest.org/en/7.1.x/reference/reference.html?highlight=pytest%20skip#pytest.skip * on this branch I seem to get the expected behavior with i.e., - `python dev.py test -v -- -k "test_concatenate_int32_overflow" -rsx` - `59382 deselected` - `python dev.py test -m full -v -- -k "test_concatenate_int32_overflow" -rsx` - `1 passed, 59381 deselected` - `python dev.py test -v -t scipy/sparse/tests/test_construct.py::TestConstructUtils::test_concatenate_int32_overflow -- -rsx` - `1 deselected` - `SCIPY_ARRAY_API=1 python dev.py test -v -t "scipy/_lib/tests/test_array_api.py" -b cupy -- -rsx` - just the two failures expected from scipygh-19194 - `python dev.py test -v -t "scipy/_lib/tests/test_array_api.py" -b cupy -- -rsx` - same (the backend setting implies the env var) - `python dev.py test -v -t "scipy/_lib/tests/test_array_api.py" -- -rsx` - `6 skipped` - `python dev.py test -j 32 -b all` - `3 failed, 44291 passed, 2546 skipped, 149 xfailed, 12 xpassed` (failures noted above + PyTorch issue from scipygh-18930) - `SCIPY_DEVICE=cuda python dev.py test -j 32 -b all` - `3 failed, 44198 passed, 2639 skipped, 149 xfailed, 12 xpassed` (failures noted above + PyTorch issue from scipygh-18930) * could there be a `pytest` bug here somewhere? Yeah, probably. But given that following their docs suggestion to avoid the global skip scope seems to solve the problem, I'm inclined not to spend much time providing a small reproducer upstream and debating with them. It is probably related to the `-k` option collecting every single test node vs. the hand-tuned selection of the single node on the command line. [skip cirrus]
scipy#19146) * Resolve scipy#18881: Enhance lobpcg documentation with updated examples - Added examples utilizing `aslinearoperator` and `LinearOperator` * Fixed issues mentioned in the reviewed comments. * Removed redundant imports in lobpcg.py * Update scipy/sparse/linalg/_eigen/lobpcg/lobpcg.py Co-authored-by: Jake Bowhay <[email protected]> * Update scipy/sparse/linalg/_eigen/lobpcg/lobpcg.py Co-authored-by: Jake Bowhay <[email protected]> * Update scipy/sparse/linalg/_eigen/lobpcg/lobpcg.py Co-authored-by: Jake Bowhay <[email protected]> * Update scipy/sparse/linalg/_eigen/lobpcg/lobpcg.py Co-authored-by: Jake Bowhay <[email protected]> * Using spdiags instead of diags in lobpcg.py in examples * Removed unnecessary variables * Update scipy/sparse/linalg/_eigen/lobpcg/lobpcg.py Co-authored-by: Jake Bowhay <[email protected]> * Update scipy/sparse/linalg/_eigen/lobpcg/lobpcg.py Co-authored-by: Jake Bowhay <[email protected]> * editorial changes lobpcg.py [skip actions] [skip cirrus] * typo fix lobpcg.py [skip actions] [skip cirrus] * LinearOperator requires dtype specified lobpcg.py I think that it is a bug in LinearOperator, filed [skip actions] [skip cirrus] * print removed lobpcg.py [skip actions] [skip cirrus] --------- Co-authored-by: Jake Bowhay <[email protected]> Co-authored-by: Andrew Knyazev <[email protected]>
[skip cirrus] [skip circle] Co-authored-by: Tyler Reddy <[email protected]>
BUG/TST: fix `test_array_api` for `cupy`
BLD: update minimum versions of meson-python and pythran
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.