|
15 | 15 | # mix of orders: C, F
|
16 | 16 | # mix of encoding types: All available types for each arrays
|
17 | 17 | arrays = [
|
18 |
| - (np.random.randint(0, 1, size=110, dtype='?').reshape(10, 11), ('?','<u1','<i1')), |
19 |
| - (np.arange(1000, dtype='<i4'), ('<i4','<i2','<u4','u2')), |
| 18 | + (np.random.randint(0, 1, size=110, dtype='?').reshape(10, 11), ('?', '<u1', '<i1')), |
| 19 | + (np.arange(1000, dtype='<i4'), ('<i4', '<i2', '<u4', 'u2')), |
20 | 20 | (np.linspace(1000, 1001, 1000, dtype='<f4').reshape(100, 10), ('<f4',)),
|
21 | 21 | (np.random.normal(loc=1000, scale=1, size=(10, 10, 10)).astype('<f8'), ('<f8',)),
|
22 |
| - (np.random.randint(0, 200, size=1000, dtype='u2').astype('<u2').reshape(100, 10, order='F'), ('<i2',)), |
| 22 | + ( |
| 23 | + np.random.randint(0, 200, size=1000, dtype='u2').astype('<u2').reshape(100, 10, order='F'), |
| 24 | + ('<i2',), |
| 25 | + ), |
23 | 26 | ]
|
24 | 27 |
|
| 28 | + |
25 | 29 | def test_encode_decode():
|
26 | 30 | for arr, encoding_types in arrays:
|
27 | 31 | for astype in encoding_types:
|
@@ -50,7 +54,7 @@ def test_repr():
|
50 | 54 |
|
51 | 55 |
|
52 | 56 | def test_backwards_compatibility():
|
53 |
| - for arr,_ in arrays: |
| 57 | + for arr, _ in arrays: |
54 | 58 | codec = Delta(dtype=arr.dtype)
|
55 | 59 | check_backwards_compatibility(Delta.codec_id, [arr], [codec], prefix=str(arr.dtype))
|
56 | 60 |
|
|
0 commit comments