Replies: 1 comment
-
I'd expect all of the numpy array funcs to behave like that for a while - until someone puts in a PR adding support for them. I think for those functions the pint/pint/facets/numpy/numpy_func.py Line 306 in 9972e60 The result unit should already be set to be the same unit as the input |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi
I'm considering using pint for a project of mine that also uses xarray.
One issue is the resampling/grouping/statistics (which should happen in lin space), as values are usually reported in dB.
While I can deal with this myself (and there is some logic to it that relies on attributes and xarray accessors), it would be better to keep dB as quantity linked to the values - which would allow me to not rely on attributes which depending on the operation are not passed forward.
However, looking at the log units which are per related doc entry certainly in beta I face the issue that for calculations I'd need to downcast beforehand nonetheless (resp. dB or log units are treated as linear units).
MWE:
Is there a proper way to handle this?
Will the log unit feature include such averaging (or other similar functions like sum, std, for that matter) when it's out of beta or should I always assume that I have to convert myself?
Beta Was this translation helpful? Give feedback.
All reactions