| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
NumPy 2.5 deprecated assigning to ndarray.shape. Every named index built from a list or array of names went through it, so ordinary indexing raised a DeprecationWarning. reshape does the same thing here - the arrays are freshly built and contiguous. Fixes google-deepmind#540. Signed-off-by: Shubh <shubh@shubhxho.com>
|
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Fixes #540.
Problem
NumPy 2.5 deprecated assigning to ndarray.shape (release note, numpy#29536).
Axis.convert_key_item uses it on every named index built from a list or array of names, so ordinary named indexing emits a DeprecationWarning under NumPy >= 2.5. Two test helpers do the same.
With -W error::DeprecationWarning on NumPy 2.5.2 before the change:
Fix
Use reshape instead. The semantics are the same at all three sites: the arrays are freshly built by np.array/np.arange and contiguous, so no copy is involved and no caller observes a difference.
Testing
The one unrelated failure on my machine, MujocoEngineTest::testRenderFlagOverridesAreNotPersistent, fails identically without this change (headless GL).