DEP: Finalize ragged array creation deprecation#22004
Merged
mattip merged 2 commits intonumpy:mainfrom Jul 18, 2022
Merged
Conversation
This finalizes all DeprcationWarnings related to the creation of object arrays from nested lists enforcing that users use `dtype=object` if this is intentional.
dd412c0 to
189eb6e
Compare
Member
|
Could you also change the status of NEP 34 to |
Member
Member
|
Travis CI is still running after 8 hours, but everything else looks good. Thanks @seberg |
3 tasks
9 tasks
This was referenced Jan 12, 2023
d61h6k4
added a commit
to RasaHQ/rasa
that referenced
this pull request
Feb 28, 2023
In order to create an array from list of inhomogeneus objects explicitly dtype to object Since numpy 1.24 numpy raises ValueError when creating Ragged array numpy/numpy#22004
4 tasks
d61h6k4
added a commit
to RasaHQ/rasa
that referenced
this pull request
Mar 6, 2023
To create an array from a list of inhomogeneous objects explicitly type to object Since NumPy 1.24 numpy raises ValueError when creating a Ragged array numpy/numpy#22004 --------- Co-authored-by: Anca Lita <27920906+ancalita@users.noreply.github.com>
alubbock
added a commit
to alubbock/pysb
that referenced
this pull request
Mar 28, 2023
Numpy v1.24 deprecated ragged arrays unless dtype=object is passed (numpy/numpy#22004). The SimulationResult class needs to support different length entries in tout in the case that these differ across simulations. PySB shouldn't convert these to a numpy array, instead preferring to keep them as a list/iterable.
This was referenced Mar 28, 2023
jmuhlich
pushed a commit
to pysb/pysb
that referenced
this pull request
Apr 11, 2023
Numpy v1.24 deprecated ragged arrays unless dtype=object is passed (numpy/numpy#22004). The SimulationResult class needs to support different length entries in tout in the case that these differ across simulations. PySB shouldn't convert these to a numpy array, instead preferring to keep them as a list/iterable.
|
What if creating either ragged or regular ndarray is the desired behavior? Is there an efficient numpy function that can check whether the input is ragged or not? |
|
Also maybe spares asanyarray, as the name suggests "any" array should work? The current doc says "Input data, in any form that can be converted to an array" |
mistafunk
added a commit
to Esri/pyprt-examples
that referenced
this pull request
Jun 26, 2023
Otherwise an exception will be triggered (e.g. within arcgis.geometry.Polygon.coordinates()): numpy/numpy#22004
mikebrv-q
added a commit
to mikebrv-q/image_registration
that referenced
this pull request
Apr 4, 2024
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
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.
This finalizes all DeprcationWarnings related to the creation of object
arrays from nested lists enforcing that users use
dtype=objectif thisis intentional.