Table Of Contents
Table Of Contents

mx.nd.ones.like

Description

Return an array of ones with the same shape and type as the input array.

Example:

x = [[ 0.,  0.,  0.],
[ 0.,  0.,  0.]]

ones_like(x) = [[ 1.,  1.,  1.],
[ 1.,  1.,  1.]]

Arguments

Argument

Description

data

NDArray-or-Symbol.

The input

Value

out The result mx.ndarray