Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 29b098d

Browse files
authored
Fixes array issue that was causing incompatibility in the subsample array function for lazy array classes (#803)
1 parent c95ed34 commit 29b098d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

fastplotlib/utils/functions.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -456,7 +456,7 @@ def subsample_array(
456456
subsample of the input array
457457
"""
458458
if np.prod(arr.shape) <= max_size:
459-
return arr # no need to subsample if already below the threshold
459+
return arr[:] # no need to subsample if already below the threshold
460460

461461
# get factor by which to divide all dims
462462
f = np.power((np.prod(arr.shape) / max_size), 1.0 / arr.ndim)

0 commit comments

Comments
 (0)