qiu_signals.arithmetic
¶
Arithmetic operators shared by the signal classes.
Classes:
-
ArithmeticOperators–Mixin implementing the arithmetic operators through a single
_binary.
Functions:
-
is_scalar–Whether the value is a scalar number, e.g. a Python or NumPy number.
-
require_same_axis–Raise if two signals to be combined are not sampled on equal axes.
Attributes:
-
BinaryOperator–An elementwise binary operator, e.g.
operator.add.
BinaryOperator
module-attribute
¶
An elementwise binary operator, e.g. operator.add.
ArithmeticOperators
¶
Mixin implementing the arithmetic operators through a single _binary.
Subclasses implement _binary(other, op, reflected), which combines the signal
with other by the elementwise operator op, as op(self, other) or, if
reflected, as op(other, self). It returns NotImplemented for unsupported
operands, so that Python tries the other operand's operator.
is_scalar
¶
Whether the value is a scalar number, e.g. a Python or NumPy number.
Source code in packages/qiu-signals/src/qiu_signals/arithmetic.py
12 13 14 | |
require_same_axis
¶
Raise if two signals to be combined are not sampled on equal axes.
Source code in packages/qiu-signals/src/qiu_signals/arithmetic.py
17 18 19 20 21 22 23 | |