Skip to content

Commit d65aae1

Browse files
committed
fix: issue of creating a 0 sized 2d array
1 parent 78a8d7a commit d65aae1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

brian2/memory/cythondynamicarray.pyx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -396,7 +396,7 @@ cdef class DynamicArray2DClass:
396396
cdef size_t i, start_idx, end_idx # Loop variables
397397

398398
if rows == 0 or cols == 0:
399-
return np.array((rows, cols), dtype=self.dtype).reshape((0, 0))
399+
return np.empty((0, 0), dtype=self.dtype)
400400

401401

402402
if stride ==cols:

0 commit comments

Comments
 (0)