Skip to content
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

DEP: Finalize ragged array creation deprecation #22004

Merged
merged 2 commits into from Jul 18, 2022

Conversation

seberg
Copy link
Member

@seberg seberg commented Jul 17, 2022

This finalizes all DeprcationWarnings related to the creation of object
arrays from nested lists enforcing that users use dtype=object if this
is intentional.

This finalizes all DeprcationWarnings related to the creation of object
arrays from nested lists enforcing that users use `dtype=object` if this
is intentional.
@mattip
Copy link
Member

mattip commented Jul 17, 2022

Could you also change the status of NEP 34 to Final, or should that be in a different PR?

@mattip
Copy link
Member

mattip commented Jul 17, 2022

@mattip
Copy link
Member

mattip commented Jul 18, 2022

Travis CI is still running after 8 hours, but everything else looks good.

Thanks @seberg

@mattip mattip merged commit 6470731 into numpy:main Jul 18, 2022
@seberg seberg deleted the ragged-dep-finalize branch July 18, 2022 15:37
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
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.
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.
@dkz-phys
Copy link

dkz-phys commented Jun 7, 2023

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?

@dkz-phys
Copy link

dkz-phys commented Jun 7, 2023

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants