__neg__¶
- array.__neg__() array ¶
Evaluates
-self_i
for each element of an array instance.Note
For signed integer data types, the numerical negative of the minimum representable integer is implementation-dependent.
Note
If
self
has a complex floating-point data type, both the real and imaginary components for eachself_i
must be negated (a result which follows from the rules of complex number multiplication).- Parameters:
self (array) – array instance. Should have a numeric data type.
- Returns:
out (array) – an array containing the evaluated result for each element in
self
. The returned array must have a data type determined by Type Promotion Rules.
Notes
Note
Element-wise results must equal the results returned by the equivalent element-wise function
negative()
.Changed in version 2022.12: Added complex data type support.