xma.functional.continuous_count

continuous_count(x: Tensor, bins: int, *, kernel_backend: KernelBackend | None = None) Tensor[source]

counts the number of occurances of the values [0, 1, …, bins) in the input tensor (bins is excluded). NOTE: the user is responsible for ensuring that the values lie in the valid range, any values outside this range are ignored and not counted.

Parameters:
  • x (torch.Tensor) – input tensor

  • bins (int) – values [0, 1, …, bins) are counted (bins is excluded)

  • kernel_backend (KernelBackend | None) – KernelBackend

Returns:

output tensor

Return type:

Tensor