Navigation Menu

Skip to content

Commit

Permalink
Added serializer fix from #434.
Browse files Browse the repository at this point in the history
  • Loading branch information
jason-neal committed Mar 12, 2018
1 parent 3b13f0f commit 41746d1
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions mpld3/_display.py
Expand Up @@ -141,6 +141,8 @@ def default(self, obj):
elif isinstance(obj, (numpy.float_, numpy.float16, numpy.float32,
numpy.float64)):
return float(obj)
elif isinstance(obj, (numpy.ndarray,)):
return obj.tolist()
return json.JSONEncoder.default(self, obj)


Expand Down

0 comments on commit 41746d1

Please sign in to comment.