Table Of Contents
Table Of Contents

mx.symbol.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

Usage

mx.symbol.square(...)

Arguments

Argument

Description

data

NDArray-or-Symbol.

The input array.

name

string, optional.

Name of the resulting symbol.