File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1688,11 +1688,11 @@ class Cell(_ListMixin, WrappedArray):
16881688 _DelayedType = DelayedCell
16891689
16901690 @classmethod
1691- def _DEFAULT (cls , n : list = ()) -> np .ndarray :
1692- if len (n ) == 0 :
1691+ def _DEFAULT (cls , shape : list = ()) -> np .ndarray :
1692+ if len (shape ) == 0 :
16931693 return Array .from_any ([])
16941694
1695- data = np .empty (n , dtype = object )
1695+ data = np .empty (shape , dtype = object )
16961696 opt = dict (
16971697 flags = ['refs_ok' , 'zerosize_ok' ],
16981698 op_flags = ['writeonly' , 'no_broadcast' ]
@@ -1737,9 +1737,9 @@ def _from_runtime(cls, objdict: dict) -> "Cell":
17371737 if objdict ['type__' ] != 'cell' :
17381738 raise TypeError ('objdict is not a cell' )
17391739 size = np .array (objdict ['size__' ], dtype = np .uint32 ).ravel ()
1740- data = np .array (objdict ['data__' ], dtype = object )
1740+ data = np .fromiter (objdict ['data__' ], dtype = object )
17411741 data = data .reshape (size [::- 1 ]).transpose ()
1742- try :
1742+ try :
17431743 obj = data .view (cls )
17441744 except Exception :
17451745 raise RuntimeError (
You can’t perform that action at this time.
0 commit comments