diff --git a/cvx/bson/file.py b/cvx/bson/file.py index 77c11213..be4a64c0 100644 --- a/cvx/bson/file.py +++ b/cvx/bson/file.py @@ -79,5 +79,4 @@ def from_bson(bson_str: bytes) -> MATRICES: data = bson.loads(bson_str) # for name, value in data.items(): - return {name: pa.ipc.read_tensor(value).to_numpy() for name, value in - data.items()} + return {name: pa.ipc.read_tensor(value).to_numpy() for name, value in data.items()} diff --git a/tests/test_json.py b/tests/test_json.py index 6dd57186..3b906c73 100644 --- a/tests/test_json.py +++ b/tests/test_json.py @@ -5,7 +5,9 @@ from cvx.json import read_json, write_json -@pytest.mark.parametrize("shape", [(50, 50), (1000, 50), (50, 1000), (1000, 1000), (5000, 2000)]) +@pytest.mark.parametrize( + "shape", [(50, 50), (1000, 50), (50, 1000), (1000, 1000), (5000, 2000)] +) def test_read_and_write_json(tmp_path, shape): data = {"a": np.random.rand(*shape), "b": 3.0, "c": "test"} write_json(tmp_path / "test.json", data)