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

Function count_boolean_trues

numpy/core/src/multiarray/item_selection.c:2635–2639  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2633 * Returns -1 on error.
2634 */
2635NPY_NO_EXPORT NPY_GCC_OPT_3 npy_intp
2636count_boolean_trues(int ndim, char *data, npy_intp const *ashape, npy_intp const *astrides)
2637{
2638 return count_nonzero_int(ndim, data, ashape, astrides, 1);
2639}
2640
2641/*NUMPY_API
2642 * Counts the number of non-zero elements in the array.

Callers 3

array_boolean_subscriptFunction · 0.85
_nonzero_indicesFunction · 0.85

Calls 1

count_nonzero_intFunction · 0.85

Tested by

no test coverage detected