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
ValidationError: Can not safely cast from 'uint64' to 'float32'
Failed validating 'datatype' in schema['properties']['data']:
{'datatype': 'float32',
'ndim': 2,
'tag': 'tag:stsci.edu:asdf/core/ndarray-1.0.0',
'title': 'Flat data array'}
On instance['data']:
{'byteorder': 'little',
'datatype': 'uint64',
'shape': [4096, 4096],
'source': 0}
@PaulHuwe and I discussed this on Slack, the problem lies with dtypes that are "compatible" as far as np.can_cast(np_in_datatype, np_datatype, 'safe') is concerned, but aren't exact matches. There's a schema feature that allows us to require an exact match on the datatype:
Validate should detect when the dtype of an ndarray object does not match the dtype specified in the schema.
The text was updated successfully, but these errors were encountered: