-
Notifications
You must be signed in to change notification settings - Fork 10
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
unwanted name attribute from asdf NDArrayType #110
Comments
Ain't an issue any more. |
I think we fixed this in the One possible idea could be to adapt asdf implementation of our quantity to remove the attribute. |
cref #364 (comment) relevant code: weldx/weldx/asdf/tags/weldx/core/geometry/spatial_data.py Lines 15 to 18 in 905e5e1
|
So reopen? |
yes I think I'd like to run some more tests until finally closing this one |
Sorry, if this caused extra work now. I just ran the attached snippet and it didn't showed the described behavior any more. |
it's good to keep in mind, I'll have to think of a proper snipped for debugging |
most likely fixed in #456 |
the linked pr fixed this issue. |
There appears to happen some unlucky attribute propagation when reading from asdf
ndarray
->pint.Quantity
->xarray.DataArray
which makes the following fail:Both
TimeSeries
have identical values but==
fails becausexarray.DataArray.identical
checks every attribute includingDataArray.name
When reading from the ASDF file in this case the name attribute gets erroneously applied:
The problem occurs because when creating a
pint.Quantity
directly from an ndarray it actually gets constructed from the asdfNDArrayType
which apparently carries.name='core/ndarray'
This propagates over to the
pint.Quantity
and finallyxarray.DataArray
.Here is a quick fix for the
TimeSeries
class 1dd1f23 but we should be aware of the issue and discuss how to handle this in general.The text was updated successfully, but these errors were encountered: