numpy_json_decoder

numpy_json_decoder#

epiworldpy.numpy_json_decoder(dct)[source]#

Restore the NumPy values written by NumpyJSONEncoder.

Use it as the object_hook of json.load().

Parameters:

dct (dict) – A decoded JSON object.

Returns:

The NumPy scalar or array dct encodes, or dct unchanged.

Return type:

object