We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bc55357 commit 149f4a0Copy full SHA for 149f4a0
tiled/_tests/test_writing.py
@@ -149,6 +149,22 @@ def test_extend_array(tree):
149
assert actual.shape == full_array.shape
150
numpy.testing.assert_equal(actual, full_array)
151
152
+ # Overwrite data (do not extend).
153
+ revised_data = numpy.ones((1, 2, 2)) * 3
154
+ revised_array = full_array.copy()
155
+ revised_array[3, :, :] = 3
156
+ ac.patch(revised_data, slice=slice(3, 4))
157
+ numpy.testing.assert_equal(ac.read(), revised_array)
158
+
159
+ # Extend out of order.
160
+ ones = numpy.ones((1, 2, 2))
161
+ ac.patch(ones * 7, slice=slice(7, 8), extend=True)
162
+ ac.patch(ones * 5, slice=slice(5, 6), extend=True)
163
+ ac.patch(ones * 6, slice=slice(6, 7), extend=True)
164
+ numpy.testing.assert_equal(ac[5:6], ones * 5)
165
+ numpy.testing.assert_equal(ac[6:7], ones * 6)
166
+ numpy.testing.assert_equal(ac[7:8], ones * 7)
167
168
169
def test_write_dataframe_full(tree):
170
with Context.from_app(
0 commit comments