Skip to content

Commit 5b78d4d

Browse files
committed
Format
1 parent b6603e8 commit 5b78d4d

File tree

1 file changed

+19
-19
lines changed

1 file changed

+19
-19
lines changed

tiledb/tests/test_libtiledb.py

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1247,7 +1247,7 @@ def test_varlen_sparse_all_empty_strings(self):
12471247

12481248
with tiledb.open(uri, mode="r") as T:
12491249
# check interior range
1250-
assert_array_equal(A[1:-1], T[1:dim_len-1]["a1"])
1250+
assert_array_equal(A[1:-1], T[1 : dim_len - 1]["a1"])
12511251
assert_array_equal(A[1:-1], T.multi_index[2 : dim_len - 1]["a1"])
12521252

12531253
def test_varlen_write_unicode(self):
@@ -1525,48 +1525,48 @@ def test_array_varlen_2d_s_fixed(self):
15251525
def test_dense_array_with_negative_positive_domain(self, lo, hi):
15261526
path = self.path("test_dense_array_with_negative_domain")
15271527
attr = tiledb.Attr(dtype=np.uint8)
1528-
dom = tiledb.Domain(tiledb.Dim("X", domain=(-20, 20),dtype=np.int64))
1528+
dom = tiledb.Domain(tiledb.Dim("X", domain=(-20, 20), dtype=np.int64))
15291529
schema = tiledb.ArraySchema(domain=dom, sparse=False, attrs=[attr])
15301530
tiledb.Array.create(path, schema)
1531-
data = np.random.randint(10, size=(hi-lo))
1531+
data = np.random.randint(10, size=(hi - lo))
15321532

1533-
with tiledb.open(path, 'w') as A:
1533+
with tiledb.open(path, "w") as A:
15341534
A[lo:hi] = data
1535-
1536-
with tiledb.open(path, 'r') as A:
1535+
1536+
with tiledb.open(path, "r") as A:
15371537
assert_array_equal(A[lo:hi], data[:])
1538-
15391538

15401539
@pytest.mark.parametrize("lo,hi", [(-20, -10), (-20, -15), (-15, -10), (-17, -13)])
15411540
def test_dense_array_with_negative_negative_domain(self, lo, hi):
15421541
path = self.path("test_dense_array_with_negative_negative_domain")
15431542
attr = tiledb.Attr(dtype=np.uint8)
1544-
dom = tiledb.Domain(tiledb.Dim("X", domain=(-20, -10),dtype=np.int64))
1543+
dom = tiledb.Domain(tiledb.Dim("X", domain=(-20, -10), dtype=np.int64))
15451544
schema = tiledb.ArraySchema(domain=dom, sparse=False, attrs=[attr])
15461545
tiledb.Array.create(path, schema)
1547-
data = np.random.randint(10, size=(hi-lo))
1546+
data = np.random.randint(10, size=(hi - lo))
15481547

1549-
with tiledb.open(path, 'w') as A:
1548+
with tiledb.open(path, "w") as A:
15501549
A[lo:hi] = data
1551-
1552-
with tiledb.open(path, 'r') as A:
1550+
1551+
with tiledb.open(path, "r") as A:
15531552
assert_array_equal(A[lo:hi], data[:])
1554-
1555-
@pytest.mark.parametrize("lo,hi", [(10, 20), (10,15),(12,15), (17,20)])
1553+
1554+
@pytest.mark.parametrize("lo,hi", [(10, 20), (10, 15), (12, 15), (17, 20)])
15561555
def test_dense_array_with_offset_domain(self, lo, hi):
15571556
path = self.path("test_dense_array_with_offset_domain")
15581557
attr = tiledb.Attr(dtype=np.uint8)
1559-
dom = tiledb.Domain(tiledb.Dim("X", domain=(10, 20),dtype=np.int64))
1558+
dom = tiledb.Domain(tiledb.Dim("X", domain=(10, 20), dtype=np.int64))
15601559
schema = tiledb.ArraySchema(domain=dom, sparse=False, attrs=[attr])
15611560
tiledb.Array.create(path, schema)
1562-
data = np.random.randint(10, size=(hi-lo))
1561+
data = np.random.randint(10, size=(hi - lo))
15631562

1564-
with tiledb.open(path, 'w') as A:
1563+
with tiledb.open(path, "w") as A:
15651564
A[lo:hi] = data
1566-
1567-
with tiledb.open(path, 'r') as A:
1565+
1566+
with tiledb.open(path, "r") as A:
15681567
assert_array_equal(A[lo:hi], data[:])
15691568

1569+
15701570
class TestSparseArray(DiskTestCase):
15711571
@pytest.mark.xfail
15721572
def test_simple_1d_sparse_vector(self):

0 commit comments

Comments
 (0)