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
thanks for the really great package. I was wondering if there is any plan to also provide methods for parsing array-like data following the pre-defined schemas. In particular, similar to what xarray-dataclasses provides.
@jhamman apologies for late reply. What I had in mind is basically an additional parse method that tries to correctly casts the input data in the schema. For example, given a 2D array of an image, and some DataArraySchema, the parse method would return the schema-compliant xarray (otherwise error if cannot be casted correctly).
This is an example implementation that inherits the DataArraySchema
Activity
jhamman commentedon Nov 28, 2022
Hi @giovp! Can you explain a bit more about your use case? I'm not sure exactly what you mean by "parsing array-like data".
jhamman commentedon Dec 30, 2022
Closing this issue since we haven't managed to keep the conversation going. Feel free to reopen if there is more to discuss here.
giovp commentedon Feb 6, 2023
@jhamman apologies for late reply. What I had in mind is basically an additional
parsemethod that tries to correctly casts the input data in the schema. For example, given a 2D array of an image, and someDataArraySchema, the parse method would return the schema-compliant xarray (otherwise error if cannot be casted correctly).This is an example implementation that inherits the
DataArraySchemaI believe some of this tooling is implemented in https://github.com/astropenguin/xarray-dataclasses/ but was wondering if there are ways to converge.
jhamman commentedon Feb 6, 2023
Thanks @giovp! This sounds similar in scope to what I wrote here: #45