🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
DemoInstallSign in
Socket

numpyencoder

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

numpyencoder

Python JSON encoder for handling Numpy data types.

0.3.1
PyPI
Maintainers
1

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
    )

Keywords

numpy

FAQs

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts