mx.nd.square

Description

Returns element-wise squared value of the input.

\[square(x) = x^2\]

Example:

 square([2, 3, 4]) = [4, 9, 16]

 The storage type of ``square`` output depends upon the input storage type:

- square(default) = default
- square(row_sparse) = row_sparse
- square(csr) = csr

Arguments

Argument

Description

data

NDArray-or-Symbol.

The input array.