From 3d1c2a38710d841b8501460c2545e41fa659a666 Mon Sep 17 00:00:00 2001 From: Thomas Schmelzer Date: Thu, 27 Jul 2023 12:58:57 -0700 Subject: [PATCH] fmt --- cvx/bson/file.py | 3 +-- tests/test_json.py | 4 +++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/cvx/bson/file.py b/cvx/bson/file.py index 77c1121..be4a64c 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 6dd5718..3b906c7 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)