Closed claydugo closed 1 year ago
Reproduce:
import numpy as np import json_tricks data = np.zeros((2, 2)) data_uncompressed = json_tricks.dumps(data) data_compressed = json_tricks.dumps(data, properties={'ndarray_compact': True}) reloaded_uncompressed = json_tricks.loads(data_uncompressed) reloaded_compressed = json_tricks.loads(data_compressed) assert np.array_equal(data, reloaded_uncompressed) assert np.array_equal(data, reloaded_compressed) assert reloaded_uncompressed.flags.writeable assert reloaded_compressed.flags.writeable
Traceback (most recent call last): File "/tmp/reproduce.py", line 16, in <module> assert reloaded_compressed.flags.writeable AssertionError
I also tried adding the 'ndarray_store_byteorder': 'suppress', flag to my dumps call but it does not change the outcome.
'ndarray_store_byteorder': 'suppress',
dumps
Can provide more information if there is something I am missing
Reproduce:
I also tried adding the
'ndarray_store_byteorder': 'suppress',
flag to mydumps
call but it does not change the outcome.Can provide more information if there is something I am missing