-
Notifications
You must be signed in to change notification settings - Fork 32
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
dependencies: Update to numpy<1.24.4 #2693
Conversation
Numpy 1.24 removed the deprecated feature of creating dtype=object arrays in: 189eb6e38e78a06d86292b5d503de12fe2bebe38 ("DEP: Finalize ragged array creation deprecation") Signed-off-by: Jan Vesely <[email protected]>
… homogeneous array Mechanism values are 2D so we need to index all three results to avoid rugged array. Signed-off-by: Jan Vesely <[email protected]>
Updates the requirements on [numpy](https://github.com/numpy/numpy) to permit the latest version. - [Release notes](https://github.com/numpy/numpy/releases) - [Changelog](https://github.com/numpy/numpy/blob/main/doc/RELEASE_WALKTHROUGH.rst) - [Commits](numpy/numpy@v1.19.0...v1.24.3) --- updated-dependencies: - dependency-name: numpy dependency-type: direct:production ... Signed-off-by: dependabot[bot] <[email protected]>
numpy >=1.24 is more sensitive to casting Python integers to numpy ints with restricted range (e.g. signed vs. unsigned). Most of our uses expect unsigned integers so switch to respective ctypes types. Signed-off-by: Jan Vesely <[email protected]>
This PR causes the following changes to the html docs (ubuntu-latest-3.7-x64):
See CI logs for the full diff. |
This PR causes the following changes to the html docs (ubuntu-latest-3.7-x64):
See CI logs for the full diff. |
# numpy 1.24 removed the above deprecation and raises | ||
# ValueError instead. Note that the below call can still | ||
# raise other ValueErrors | ||
if 'The requested array has an inhomogeneous shape' in str(e): |
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.
Was this getting sent as an np.VisibleDeprecationWarning
before? It seems to be what's referenced in https://numpy.org/doc/stable/release/1.24.0-notes.html for ragged arrays, but I don't remember seeing this message before, just the "Creating an ndarray from ragged nested sequences..." one.
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.
Though I see now I referenced this https://numpy.org/neps/nep-0034-infer-dtype-is-object.html in the comment. Maybe I just didn't take note of the message.
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.
I think the wording of the warning was different. the numpy commit (numpy/numpy@189eb6e, clumsily referenced in the commit that adds these lines)
shows that the removed warnings were: "Creating an ndarray from ragged nested sequences ... " and similar. while the remaining error messages are
"setting an array element with a sequence. The "
"requested array has an inhomogeneous shape after "
"%d dimensions. The detected shape was "
Numpy 1.24 removes few deprecated features and introduces new deprecations;
safe_create_np_array
to handle both the original DeprecationWarning and the new ValueErrortest_save_state_before_simulations
to avoid rugged array