Skip to content

Commit f6dfda5

Browse files
committed
fix layout
1 parent cd276cd commit f6dfda5

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

test_autoarray/layout/test_region.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ def test__slice_2d__addition():
152152
image = np.ones((2, 2))
153153
region = aa.Region2D(region=(0, 1, 0, 1))
154154

155-
array[region.slice] += image[region.slice]
155+
array = array.at[region.slice].add(image[region.slice])
156156

157157
assert (array == np.array([[1.0, 0.0], [0.0, 0.0]])).all()
158158

@@ -161,7 +161,7 @@ def test__slice_2d__addition():
161161
image = np.ones((2, 2))
162162
region = aa.Region2D(region=(0, 1, 0, 1))
163163

164-
array[region.slice] += image[region.slice]
164+
array = array.at[region.slice].add(image[region.slice])
165165

166166
assert (array == np.array([[2.0, 1.0], [1.0, 1.0]])).all()
167167

@@ -170,7 +170,7 @@ def test__slice_2d__addition():
170170
image = np.ones((3, 3))
171171
region = aa.Region2D(region=(1, 3, 2, 3))
172172

173-
array[region.slice] += image[region.slice]
173+
array = array.at[region.slice].add(image[region.slice])
174174

175175
assert (
176176
array == np.array([[1.0, 1.0, 1.0], [1.0, 1.0, 2.0], [1.0, 1.0, 2.0]])
@@ -183,7 +183,7 @@ def test__slice_2d__set_to_zerose():
183183

184184
region = aa.Region2D(region=(0, 1, 0, 1))
185185

186-
array[region.slice] = 0
186+
array = array.at[region.slice].set(0)
187187

188188
assert (array == np.array([[0.0, 1.0], [1.0, 1.0]])).all()
189189

@@ -192,7 +192,7 @@ def test__slice_2d__set_to_zerose():
192192

193193
region = aa.Region2D(region=(1, 3, 2, 3))
194194

195-
array[region.slice] = 0
195+
array = array.at[region.slice].set(0)
196196

197197
assert (
198198
array == np.array([[1.0, 1.0, 1.0], [1.0, 1.0, 0.0], [1.0, 1.0, 0.0]])

0 commit comments

Comments
 (0)