-
Notifications
You must be signed in to change notification settings - Fork 11
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
Fallback on import newer numpy.testing module #65
Conversation
WalkthroughThis update primarily focuses on enhancing compatibility with different versions of Changes
TipsChat with CodeRabbit Bot (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Review Status
Actionable comments generated: 0
Files ignored due to filter (1)
- pyproject.toml
Files selected for processing (1)
- sleap_io/io/nwb.py (1 hunks)
Additional comments (Suppressed): 1
sleap_io/io/nwb.py (1)
- 12-15: The change is a good approach to ensure backward compatibility with older versions of numpy that do not have the
ArrayLike
type. This change should not affect the functionality of the code asnp.ndarray
is a suitable fallback.
Codecov Report
@@ Coverage Diff @@
## main #65 +/- ##
==========================================
- Coverage 94.79% 94.64% -0.16%
==========================================
Files 12 12
Lines 1192 1195 +3
==========================================
+ Hits 1130 1131 +1
- Misses 62 64 +2
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PR adds a workaround for running sleap-io in older environments with numpy <1.20
Summary by CodeRabbit
numpy
by handling the import ofArrayLike
fromnumpy.typing
. This change ensures that the code can function correctly even ifArrayLike
is not available in the installed version ofnumpy
.