__mod__¶
- array.__mod__(other: int | float | array, /) array ¶
Evaluates
self_i % other_i
for each element of an array instance with the respective element of the arrayother
.- Parameters:
self (array) – array instance. Should have a real-valued data type.
other (Union[int, float, array]) – other array. Must be compatible with
self
(see Broadcasting). Should have a real-valued data type.
- Returns:
out (array) – an array containing the element-wise results. Each element-wise result must have the same sign as the respective element
other_i
. The returned array must have a real-valued floating-point data type determined by Type Promotion Rules.
Notes
Element-wise results, including special cases, must equal the results returned by the equivalent element-wise function
remainder()
.For input arrays which promote to an integer data type, the result of division by zero is unspecified and thus implementation-defined.