Numpy scalars needs to be converted to python built-in in scan info
Sending numpy scalars like np.int64 in scan info raise the following exception. Actually, only arrays were automatically converted to json.
File "/home/blissadm/local/bliss.git/blissdata/blissdata/redis_engine/scan.py", line 180, in _filter_nan_values
return json_nan_to_none(obj)
@NumpyEncoder: <class 'blissdata.redis_engine.scan.Scan._filter_nan_values.<locals>.NumpyEncoder'>
@format_bytes: <function Scan._filter_nan_values.<locals>.format_bytes at 0x7f7e0e504430>
@json_nan_to_none: <function Scan._filter_nan_values.<locals>.json_nan_to_none at 0x7f7e06d7cee0>
@obj: ... (truncated)
File "/home/blissadm/local/bliss.git/blissdata/blissdata/redis_engine/scan.py", line 170, in json_nan_to_none
json_string = NumpyEncoder().encode(obj)
@NumpyEncoder: <class 'blissdata.redis_engine.scan.Scan._filter_nan_values.<locals>.NumpyEncoder'>
@format_bytes: <function Scan._filter_nan_values.<locals>.format_bytes at 0x7f7e0e504430>
@obj: ... (truncated)
File "/users/blissadm/conda/miniconda/envs/bliss_dev/lib/python3.9/json/encoder.py", line 199, in encode
chunks = self.iterencode(o, _one_shot=True)
@o: ... (truncated)
@self: <blissdata.redis_engine.scan.Scan._filter_nan_values.<locals>.NumpyEncoder object at 0x7f7e06d20700>
File "/users/blissadm/conda/miniconda/envs/bliss_dev/lib/python3.9/json/encoder.py", line 257, in iterencode
return _iterencode(o, 0)
@_encoder: <built-in function encode_basestring_ascii>
@_iterencode: <_json.Encoder object at 0x7f7e06fc5100>
@_one_shot: True
@floatstr: <function JSONEncoder.iterencode.<locals>.floatstr at 0x7f7e06d7cf70>
@markers: ... (truncated)
@o: ... (truncated)
@self: <blissdata.redis_engine.scan.Scan._filter_nan_values.<locals>.NumpyEncoder object at 0x7f7e06d20700>
File "/home/blissadm/local/bliss.git/blissdata/blissdata/redis_engine/scan.py", line 158, in default
return json.JSONEncoder.default(self, o)
@o: 488
@self: <blissdata.redis_engine.scan.Scan._filter_nan_values.<locals>.NumpyEncoder object at 0x7f7e06d20700>
File "/users/blissadm/conda/miniconda/envs/bliss_dev/lib/python3.9/json/encoder.py", line 179, in default
raise TypeError(f'Object of type {o.__class__.__name__} '
@o: 488
@self: <blissdata.redis_engine.scan.Scan._filter_nan_values.<locals>.NumpyEncoder object at 0x7f7e06d20700>
TypeError: Object of type int64 is not JSON serializable