Table Of Contents
Table Of Contents

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

Usage

mx.symbol.sign(...)

Arguments

Argument

Description

data

NDArray-or-Symbol.

The input array.

name

string, optional.

Name of the resulting symbol.