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

No longer warn and convert ndarray subclasses #1856

Open
braingram opened this issue Oct 29, 2024 · 0 comments
Open

No longer warn and convert ndarray subclasses #1856

braingram opened this issue Oct 29, 2024 · 0 comments
Milestone

Comments

@braingram
Copy link
Contributor

Description of the problem

With asdf 4.0 we can drop supporting unknown ndarray subclasses:

DEFAULT_CONVERT_UNKNOWN_NDARRAY_SUBCLASSES = True

asdf/asdf/yamlutil.py

Lines 304 to 310 in f3f6070

if convert_ndarray_subclasses and isinstance(obj, np.ndarray):
warnings.warn(
f"A ndarray subclass ({type(obj)}) was converted as a ndarray. "
"This behavior will be removed from a future version of ASDF. "
"See https://asdf.readthedocs.io/en/latest/asdf/config.html#convert-unknown-ndarray-subclasses",
AsdfConversionWarning,
)

@braingram braingram added this to the 4.0.0 milestone Oct 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant