-
Notifications
You must be signed in to change notification settings - Fork 264
Replace np.sctypes for numpy 2.0 compat #1250
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
Merged
Merged
Changes from 33 commits
Commits
Show all changes
51 commits
Select commit
Hold shift + click to select a range
2623523
replace np.sctypes with np.core.sctypes
d550152
rm unused imports
6e873c6
run blue instead of black
0f5ad6e
add author entries
1dac328
manually define the mapping between str and scalar types in casting.py
7966160
rm unused imports
07cea85
rm unused variable definition
d3d23db
fix blue
ac9e16f
fix missing import
6c30a84
try without using the sized aliases
3639711
Revert "try without using the sized aliases"
4cdba01
try with sized aliases again and np.longdouble instead of np.float128
2398cc3
use combination of getattr and hasattr, include float96 and complex19…
fcd8dd0
rm use of np.maximum_sctype
edd95db
rm unused import
53655ec
fix quotes for blue style
e97c992
fix np.sctypeDict calls
65106d9
better var name
363b403
rm unused imports
9fc2d34
Merge branch 'master' into np.sctypes
larsoner 4815ee5
fix blue
49048c2
fix spelling
c76fe32
rm unused imports
079ddc8
try test fix suggested by larsoner
319f23f
try simpler
2c3b43d
FIX: Only need legacy if on 2.0
larsoner 9214846
FIX: Cast
larsoner ae0e36e
FIX: Consistency
larsoner aca58c3
FIX: Newbyteorder
larsoner c60a234
fix typo
mscheltienne 1a9ebad
fix more stuff
97e3aa9
more fix
a765af0
fix more stuff
df96ae3
FIX: check
larsoner 83111ea
FIX: check
larsoner 6ffea1b
FIX: Python types
larsoner 86b0597
FIX: Preserve
larsoner fbbd801
FIX: Simplify
larsoner 4630e0d
FIX: Maybe
larsoner 49b1d41
FIX: Better
larsoner e61e7a0
Merge branch 'master' into np.sctypes
larsoner 5eb5e54
FIX: Revert
larsoner a1ddae8
FIX: ComplexWarning
larsoner cd362aa
FIX: Context
larsoner c32b0d2
FIX: One more
larsoner d4596b7
FIX: Explicit
larsoner 0f746c0
Apply suggestions from code review
larsoner e3c72e1
FIX: Style
larsoner e3a7495
STY: Flake
larsoner 1bc593c
FIX: Test val equiv
larsoner a71eebf
FIX: Version
larsoner File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,12 @@ | ||
import numpy as np | ||
import pytest | ||
|
||
# Ignore warning requesting help with nicom | ||
with pytest.warns(UserWarning): | ||
import nibabel.nicom | ||
|
||
|
||
def pytest_configure(config): | ||
"""Configure pytest options.""" | ||
if int(np.__version__[0]) >= 2: | ||
np.set_printoptions(legacy=125) | ||
larsoner marked this conversation as resolved.
Show resolved
Hide resolved
|
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.