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
    )

Installation

pip install numpyencoder==0.3.2

Project details


Download files

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

Source Distribution

numpyencoder-0.3.2.tar.gz (3.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

numpyencoder-0.3.2-py3-none-any.whl (3.5 kB view details)

Uploaded Python 3

File details

Details for the file numpyencoder-0.3.2.tar.gz.

File metadata

  • Download URL: numpyencoder-0.3.2.tar.gz
  • Upload date:
  • Size: 3.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for numpyencoder-0.3.2.tar.gz
Algorithm Hash digest
SHA256 3107f51b2d90a053fea5e4075b024080c07bfabff0050e070ba8e90241734f16
MD5 9bbdc2826aad1b02a8f39261967b230a
BLAKE2b-256 c40d266647b8986a9d5ff10bdf50b5d77c90c03038f56132d34d51a59f1bbe56

See more details on using hashes here.

File details

Details for the file numpyencoder-0.3.2-py3-none-any.whl.

File metadata

  • Download URL: numpyencoder-0.3.2-py3-none-any.whl
  • Upload date:
  • Size: 3.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for numpyencoder-0.3.2-py3-none-any.whl
Algorithm Hash digest
SHA256 a5935afdbbc237c1b6c23b5c7bc0e77645a0bbd9ed5bbb1eb8449da75909699f
MD5 6bd6c018b978a031f48ceaee5748b758
BLAKE2b-256 82ee372a5080e5185bb7ec685040c33be3845418341cb0764c7033f1e1cf02c6

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page