This PR fixes #159 by doing explicit type coercion on numpy scalars when converting to JSON.
It's a bit of a stop-gap solution for now. I think we should at some point re-structure how serialize_obj is implemented and used, so that it applies transparently throughout all __json__ calls. That's probably out of scope for this fix though, so this PR should be ready to go.
This PR fixes #159 by doing explicit type coercion on numpy scalars when converting to JSON.
It's a bit of a stop-gap solution for now. I think we should at some point re-structure how
serialize_obj
is implemented and used, so that it applies transparently throughout all__json__
calls. That's probably out of scope for this fix though, so this PR should be ready to go.