count_nonzeroΒΆ

Counts the number of array elements which are non-zero.

Abstract Signature:

count_nonzero(x: array, axis: Optional[Union[int, Tuple[int, Ellipsis]]], keepdims: bool)

JAX (Core)

API: jax.numpy.count_nonzero
Strategy: Direct Mapping

Keras

API: keras.ops.numpy.count_nonzero
Strategy: Direct Mapping

TensorFlow

API: tf.math.count_nonzero
Strategy: Direct Mapping

Flax NNX

API: jax.numpy.count_nonzero
Strategy: Direct Mapping