numpyencoder icon indicating copy to clipboard operation
numpyencoder copied to clipboard

Custom Python JSON encoder for handling Numpy data types

Results numpyencoder issues
Sort by recently updated
recently updated
newest added

Further to #5 and #6 `np.complex_` deprecation needs correctly handling such as to maintain backwards compatibility as it throws up errors when run with newer versions of Numpy... ``` File...

With Numpy 2.2.5 I encounter an error... ``` topostats/io.py:1172: in dict_to_json json.dump(data, f, indent=indent, cls=NumpyEncoder) /usr/lib/python3.11/json/__init__.py:179: in dump for chunk in iterable: /usr/lib/python3.11/json/encoder.py:432: in _iterencode yield from _iterencode_dict(o, _current_indent_level) /usr/lib/python3.11/json/encoder.py:406:...

I am using python 3.8.1 and already downloaded numpyencoder using **pip install numpyencoder**. However, I can't import it. Could you please help me ?

Hi, Current code does not support bool_, void and complex types. This causes issues when encoding certain dtype-s (e.g. from h5py files). Adding the following lines will resolve the issue:...