Modulo

class npdsp.Modulo(value: ArrayLike, name: str | None = None)[source]

Calculate the remainder of division by a value.

Parameters:
  • value (SignalLike) – Value or array used as the divisor. It must not contain zero.

  • name (str, optional) – Optional name used to identify the block within a pipeline.

Raises:

ZeroDivisionError – If value contains zero.

process(x: NDArray[Any]) NDArray[Any][source]

Calculate the element-wise remainder of division.

Parameters:

x (Signal) – Input signal.

Returns:

Remainder after dividing x by self.value using NumPy broadcasting rules.

Return type:

Signal