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.3.0
Filename, size File type Python version Upload date Hashes
Filename, size numpyencoder-0.3.0-py3-none-any.whl (3.0 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size numpyencoder-0.3.0.tar.gz (1.9 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page