NdArray::negative

Numerical negative, element-wise

Description

SciPhp\NdArray NdArray::negative()

Parameters

This function has no parameters.

Return Values

The new SciPhp\NdArray

Examples

use SciPhp\NumPhp as np;

$x np::arange(0102);

echo 
$x->negative();

The above example will output:

[0   -2  -4  -6  -8]

See Also