Skip to content

Commit

Permalink
ruff formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
ehgus committed Nov 24, 2024
1 parent 91e0c9a commit 0780934
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions numcodecs/tests/test_delta.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,17 @@
# mix of orders: C, F
# mix of encoding types: All available types for each arrays
arrays = [
(np.random.randint(0, 1, size=110, dtype='?').reshape(10, 11), ('?','<u1','<i1')),
(np.arange(1000, dtype='<i4'), ('<i4','<i2','<u4','u2')),
(np.random.randint(0, 1, size=110, dtype='?').reshape(10, 11), ('?', '<u1', '<i1')),
(np.arange(1000, dtype='<i4'), ('<i4', '<i2', '<u4', 'u2')),
(np.linspace(1000, 1001, 1000, dtype='<f4').reshape(100, 10), ('<f4',)),
(np.random.normal(loc=1000, scale=1, size=(10, 10, 10)).astype('<f8'), ('<f8',)),
(np.random.randint(0, 200, size=1000, dtype='u2').astype('<u2').reshape(100, 10, order='F'), ('<i2',)),
(
np.random.randint(0, 200, size=1000, dtype='u2').astype('<u2').reshape(100, 10, order='F'),
('<i2',),
),
]


def test_encode_decode():
for arr, encoding_types in arrays:
for astype in encoding_types:
Expand Down Expand Up @@ -50,7 +54,7 @@ def test_repr():


def test_backwards_compatibility():
for arr,_ in arrays:
for arr, _ in arrays:
codec = Delta(dtype=arr.dtype)
check_backwards_compatibility(Delta.codec_id, [arr], [codec], prefix=str(arr.dtype))

Expand Down

0 comments on commit 0780934

Please sign in to comment.