scipp / scipp

Multi-dimensional data arrays with labeled dimensions
https://scipp.github.io/
BSD 3-Clause "New" or "Revised" License
113 stars 16 forks source link

Confusing error message from `allclose` #3548

Open nvaytet opened 1 week ago

nvaytet commented 1 week ago
import scipp as sc

a = sc.arange('x', 3., unit='K')

sc.allclose(a, a, rtol=sc.scalar(1.0e-3, unit='K'))

The error is UnitError: Expected unit K, got dimensionless. For rtol arg but I would have expected the error to be UnitError: Expected unit dimensionless, got K. For rtol arg ?