mx.nd.sign

Description

Returns element-wise sign of the input.

Example:

 sign([-2, 0, 3]) = [-1, 0, 1]

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

- sign(default) = default
- sign(row_sparse) = row_sparse
- sign(csr) = csr

Arguments

Argument

Description

data

NDArray-or-Symbol.

The input array.