Closed mlincett closed 1 year ago
json doesn't understand numpy types, you can call array.tolist() before trying to serialize
json doesn't understand numpy types, you can call array.tolist() before trying to serialize
Makes sense. I was just wondering whether or not this used to work in the past, considering that the CI test seems to output JSON just fine.
I guess when we build SkyScanResult
from the runtime scanner output it does not use the numpy type for the internal representation but it does when loading a npz
.
The python exception is annoyingly cryptic about where the problem is. However since the JSON file is sequentially written just up to where the error occurs, it appears that the problem are the metadata (likely the nside
field).
Edit: this is due to us storing metadata in the dtype.metadata
of numpy, something I'd like to move away from (see new issue #15).
I am trying to convert old
npz
test data to JSON in order to make CI testing ofskymap_scanner
more transparent. Although such conversion seems to fail.