Skip to content

Commit

Permalink
fix bug in to_ndarray causing memory problems
Browse files Browse the repository at this point in the history
full array was being requested in memory to check shape
  • Loading branch information
pattonw committed Oct 15, 2024
1 parent 6ac4705 commit f423749
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion funlib/persistence/arrays/array.py
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,7 @@ def to_ndarray(self, roi, fill_value=0):

shape = roi.shape / self.voxel_size
data = np.zeros(
self[self.roi].shape[: self.channel_dims] + shape, dtype=self.data.dtype
self.shape[: self.channel_dims] + shape, dtype=self.data.dtype
)
if fill_value != 0:
data[:] = fill_value
Expand Down

0 comments on commit f423749

Please sign in to comment.