Skip to main content

NDArray::negative

public static function negative(NDArray|array|float|int $a): NDArray|float|int;

Computes the element-wise negation (unary minus) of an array, returning a new array with the negation of each element.


Notes

tip

GPU SUPPORTED

This operation is supported by GPU (VRAM) and contains a custom CUDA kernel.