MCPcopy Index your code
hub / github.com/pydata/xarray / size

Method size

xarray/namedarray/core.py:416–426  ·  view source on GitHub ↗

Number of elements in the array. Equal to ``np.prod(a.shape)``, i.e., the product of the array’s dimensions. See Also -------- numpy.ndarray.size

(self)

Source from the content-addressed store, hash-verified

414
415 @property
416 def size(self) -> _IntOrUnknown:
417 """
418 Number of elements in the array.
419
420 Equal to ``np.prod(a.shape)``, i.e., the product of the array’s dimensions.
421
422 See Also
423 --------
424 numpy.ndarray.size
425 """
426 return math.prod(self.shape)
427
428 def __len__(self) -> _IntOrUnknown:
429 try:

Callers

nothing calls this directly

Calls 1

prodMethod · 0.45

Tested by

no test coverage detected