Replies: 1 comment
-
Thanks for opening this discussion. Hopefully I didn't go overboard with my response :)
import asdf
import numpy as np
arr = np.zeros(100)
asdf.AsdfFile({"arr": arr}).write_to("arr.asdf")
with asdf.open("arr.asdf", lazy_load=True) as af:
print(af["arr"])
print(af["arr"][0])
print(af["arr"]) Running the above example gives the following output:
Note the Validation is a separate process that happens on the tagged YAML representation of the tree. For the above example, the call to
To add some comments to the possibilities you mentioned (to hopefully provide a bit more context and information about what's happening):
The conversion of a tagged YAML representation to a custom (python) object (deserialization) occurs during
At the end of
I don't think there is any combination of options currently that would produce this behavior. The closest match would be the "lazy tree" feature discussed here. |
Beta Was this translation helpful? Give feedback.
-
I understand there is a special case with
!ndarray
tag gets converted toasdf.types.NDArrayType
immediately. What happens to the other tag types. I can think of a few possibilities:Beta Was this translation helpful? Give feedback.
All reactions