You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Whenever Quantity is updated to support the Python array API standard, then this will become trivial because Quantity will no longer subclass ndarray, instead it will satisfy the API's protocol.
Currently the Quantity converter calls
_make_array
before creating the Quantity:asdf-astropy/asdf_astropy/converters/unit/quantity.py
Line 33 in 0c50251
When the array is stored as an internal ASDF block this will force the block to be loaded at the time of deserialization.
Initial attempts to enable lazy loading by removing the above mentioned line do not prevent the ASDF block from being loaded possibly because NDArrayType is not a subclass of ndarray and astropy will attempt to iterate through the array during loading:
https://github.com/astropy/astropy/blob/79dd50f61ef5e0a568dd42549319db38fefd0bc7/astropy/units/quantity.py#L495
triggering loading of the ASDF block.
The text was updated successfully, but these errors were encountered: