MCPcopy Create free account
hub / github.com/numpy/numpy / count_elem

Function count_elem

numpy/lib/recfunctions.py:860–866  ·  view source on GitHub ↗
(dt)

Source from the content-addressed store, hash-verified

858 # counts up elements in subarrays, including nested subarrays, and returns
859 # base dtype and count
860 def count_elem(dt):
861 count = 1
862 while dt.shape != ():
863 for size in dt.shape:
864 count *= size
865 dt = dt.base
866 return dt, count
867
868 fields = []
869 for name in dt.names:

Callers 1

_get_fields_and_offsetsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected