Let JSONEncoder handle Numpy data types.

json.JSONEncoder cannot serialize Numpy data types. Numpy arrays
and array scalars have a tolist() method which casts the object to
a standard python data type.
Merge pull request #1107 from dpretty/master

Let JSONEncoder handle Numpy data types.