Table Of Contents
Table Of Contents

mx.symbol.reciprocal

Description

Returns the reciprocal of the argument, element-wise.

Calculates 1/x.

Example:

reciprocal([-2, 1, 3, 1.6, 0.2]) = [-0.5, 1.0, 0.33333334, 0.625, 5.0]

Usage

mx.symbol.reciprocal(...)

Arguments

Argument

Description

data

NDArray-or-Symbol.

The input array.

name

string, optional.

Name of the resulting symbol.