__mul__¶
- array.__mul__(other: int | float | complex | array, /) array¶
Calculates the product for each element of an array instance with the respective element of the array
other.Note
Floating-point multiplication is not always associative due to finite precision.
- Parameters:
self (array) – array instance. Should have a numeric data type.
other (Union[int, float, complex, array]) – other array. Must be compatible with
self(see Broadcasting). Should have a numeric data type.
- Returns:
out (array) – an array containing the element-wise products. The returned array must have a 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
multiply().
Changed in version 2022.12: Added complex data type support.