Skip to content

Commit b3f6c12

Browse files
committed
Fix 0d array conversions from Python
1 parent b17d215 commit b3f6c12

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Diff for: stdlib/numpy/pybridge.codon

+2-2
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@ class ndarray:
245245
k = 0
246246
for idx in util.multirange(shape):
247247
off = 0
248-
for i in range(ndim):
248+
for i in staticrange(ndim):
249249
off += idx[i] * strides[i]
250250
e = Ptr[cobj](arr_data + off)[0]
251251
if hasattr(dtype, "__from_py__"):
@@ -263,7 +263,7 @@ class ndarray:
263263
k = 0
264264
for idx in util.multirange(shape):
265265
off = 0
266-
for i in range(ndim):
266+
for i in staticrange(ndim):
267267
off += idx[i] * strides[i]
268268
e = Ptr[dtype](arr_data + off)[0]
269269
data[k] = e

0 commit comments

Comments
 (0)