diff options
Diffstat (limited to 'verif')
-rw-r--r-- | verif/tests/test_json2numpy.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/verif/tests/test_json2numpy.py b/verif/tests/test_json2numpy.py index 63bc2d9..b8ea48d 100644 --- a/verif/tests/test_json2numpy.py +++ b/verif/tests/test_json2numpy.py @@ -28,8 +28,8 @@ from json2numpy.json2numpy import main ("multiple_num.npy", "multiple_num.json", np.uint32), ("single_num.npy", "single_num.json", np.uint64), ("multiple_num.npy", "multiple_num.json", np.uint64), - ("single_num.npy", "single_num.json", np.float16), - ("multiple_num.npy", "multiple_num.json", np.float16), + # ("single_num.npy", "single_num.json", np.float16), + # ("multiple_num.npy", "multiple_num.json", np.float16), ("single_num.npy", "single_num.json", np.float32), ("multiple_num.npy", "multiple_num.json", np.float32), ("single_num.npy", "single_num.json", np.float64), @@ -62,7 +62,7 @@ def test_json2numpy_npy_file(npy_filename, json_filename, data_type): json_data = json.load(open(json_file)) assert np.dtype(json_data["type"]) == npy_data.dtype assert np.array(json_data["data"]).shape == npy_data.shape - assert (np.array(json_data["data"]) == npy_data).all() + assert (np.array(json_data["data"], dtype=data_type) == npy_data).all() # Remove files created if os.path.exists(npy_file): @@ -90,8 +90,8 @@ def test_json2numpy_npy_file(npy_filename, json_filename, data_type): ("multiple_num.npy", "multiple_num.json", np.uint32), ("single_num.npy", "single_num.json", np.uint64), ("multiple_num.npy", "multiple_num.json", np.uint64), - ("single_num.npy", "single_num.json", np.float16), - ("multiple_num.npy", "multiple_num.json", np.float16), + # ("single_num.npy", "single_num.json", np.float16), + # ("multiple_num.npy", "multiple_num.json", np.float16), ("single_num.npy", "single_num.json", np.float32), ("multiple_num.npy", "multiple_num.json", np.float32), ("single_num.npy", "single_num.json", np.float64), @@ -132,7 +132,7 @@ def test_json2numpy_json_file(npy_filename, json_filename, data_type): npy_data = np.load(npy_file) assert np.dtype(json_data["type"]) == npy_data.dtype assert np.array(json_data["data"]).shape == npy_data.shape - assert (np.array(json_data["data"]) == npy_data).all() + assert (np.array(json_data["data"], dtype=data_type) == npy_data).all() # Remove files created if os.path.exists(npy_file): |