Skip to main content

NDArray::square

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

Computes the element-wise square of an array, returning a new array with each element squared.


Notes

tip

GPU SUPPORTED

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