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
It seems pint > 0.10 loses support for numpy.allclose. Running
from pint import Unit
import numpy as np
x = np.array([1, 2, 3]) * Unit("kelvin")
np.allclose(x, x)
yields
TypeError: no implementation found for 'numpy.allclose' on types that implement __array_function__: [<class 'pint.quantity.build_quantity_class.<locals>.Quantity'>]
I'm guessing this was just missed by #905? Happy to submit a PR / test if this is the case.
The text was updated successfully, but these errors were encountered:
I don't think np.allclose was ever supported. The only change between 0.9 and 0.10 is that it does not fall back to the magnitude anymore. This:
In [3]: x=np.arange(5) *ureg.m
...: y=x.to(ureg.mm)
...: np.allclose(x, y)
.../pint/pint/quantity.py:1377: UnitStrippedWarning: Theunitofthequantityisstripped.
warnings.warn("The unit of the quantity is stripped.", UnitStrippedWarning)
Out[3]: False
It seems
pint > 0.10
loses support fornumpy.allclose
. Runningyields
I'm guessing this was just missed by #905? Happy to submit a PR / test if this is the case.
The text was updated successfully, but these errors were encountered: