You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Workaround due to shadowing builtin bool
* finfo and iinfo can take an array as well as a dtype
* Make default unsigned int array API compliant
* Remove assumption that arrays have `nbytes` property
Copy file name to clipboardExpand all lines: cubed/storage/virtual.py
+3-2Lines changed: 3 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -86,9 +86,10 @@ def __init__(
86
86
chunks: T_RegularChunks,
87
87
max_nbytes: int=10**6,
88
88
):
89
-
ifarray.nbytes>max_nbytes:
89
+
nbytes=array_memory(array.dtype, array.shape)
90
+
ifnbytes>max_nbytes:
90
91
raiseValueError(
91
-
f"Size of in memory array is {memory_repr(array.nbytes)} which exceeds maximum of {memory_repr(max_nbytes)}. Consider loading the array from storage using `from_array`."
92
+
f"Size of in memory array is {memory_repr(nbytes)} which exceeds maximum of {memory_repr(max_nbytes)}. Consider loading the array from storage using `from_array`."
0 commit comments