Closed davidhassell closed 4 years ago
Fixed in v3.2.3, now released in PyPi.
In [7]: import cfunits
In [8]: u = cfunits.Units(1.0)
In [9]: u.isvalid
Out[9]: False
In [10]: u.reason_notvalid
Out[10]: "Bad units type: <class 'float'>"
In [11]: u.units
Out[11]: 1.0
This should instead store the bad units and set the
isvalid
attribute toFalse
See https://github.com/NCAS-CMS/cf-python/issues/23