Skip to main content

Python JSON encoder for handling Numpy data types.

Project description

numpyencoder

Custom Python JSON encoder for handling Numpy data types.

Example Use:

from numpyencoder import NumpyEncoder

numpy_data = np.array([0, 1, 2, 3])

with open(json_file, 'w') as file:
    json.dump(numpy_data, file, indent=4, sort_keys=True,
              separators=(', ', ': '), ensure_ascii=False,
              cls=NumpyEncoder)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for numpyencoder, version 0.2.0
Filename, size File type Python version Upload date Hashes
Filename, size numpyencoder-0.2.0-py3-none-any.whl (3.0 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size numpyencoder-0.2.0.tar.gz (1.7 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page