Skip to content

Commit f423749

Browse files
committed
fix bug in to_ndarray causing memory problems
full array was being requested in memory to check shape
1 parent 6ac4705 commit f423749

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

funlib/persistence/arrays/array.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -339,7 +339,7 @@ def to_ndarray(self, roi, fill_value=0):
339339

340340
shape = roi.shape / self.voxel_size
341341
data = np.zeros(
342-
self[self.roi].shape[: self.channel_dims] + shape, dtype=self.data.dtype
342+
self.shape[: self.channel_dims] + shape, dtype=self.data.dtype
343343
)
344344
if fill_value != 0:
345345
data[:] = fill_value

0 commit comments

Comments
 (0)