marl / jams

A JSON Annotated Music Specification for Reproducible MIR Research
ISC License
186 stars 27 forks source link

Numpy JSON serialization #160

Closed bmcfee closed 7 years ago

bmcfee commented 7 years ago

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.

ejhumphrey commented 7 years ago

LGTM 👍