Skip to content

AFM-SPM/numpyencoder

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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
    )

About

Custom Python JSON encoder for handling Numpy data types

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%