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
Arrays with dtype timedelta64 are basically quantities with dimension [time], and they even have explicit units.
It would be really useful to be able to convert between those and pint quantities. The core logic should probably live in pint, but I think we should figure out a way to make the conversion easier:
(not sure if overloading .to would be worth it, but if not I'm sure we can come up with something better).
Similarly, I'd like to be able to infer the frequency of a datetime64 object and get the frequency (if any) as a quantity. It seems this works (found here):
Arrays with dtype
timedelta64
are basically quantities with dimension[time]
, and they even have explicit units.It would be really useful to be able to convert between those and
pint
quantities. The core logic should probably live inpint
, but I think we should figure out a way to make the conversion easier:(not sure if overloading
.to
would be worth it, but if not I'm sure we can come up with something better).Similarly, I'd like to be able to infer the frequency of a
datetime64
object and get the frequency (if any) as a quantity. It seems this works (found here):where the timedelta would then be converted to
pint
using the functionality described above.The text was updated successfully, but these errors were encountered: