astro py:docs

- Index
- Modules

### Navigation

- next »
- « previous |
- Astropy v5.2.1 »
- Astropy Core Package Utilities (`astropy.utils`) »
- Masked Values (`astropy.utils.masked`) »
- count_nonzero

# count_nonzero

astropy.utils.masked.function_helpers.count_nonzero(a, axis=None, *, keepdims=False)

  Counts the number of non-zero values in the array `a`.

  Like `numpy.count_nonzero`, with masked values counted as 0 or `False`.