Table Of Contents
Table Of Contents

mxnet.ndarray.sqrt

mxnet.ndarray.sqrt(data=None, out=None, name=None, **kwargs)

Returns element-wise square-root value of the input.

\[\textrm{sqrt}(x) = \sqrt{x}\]

Example:

sqrt([4, 9, 16]) = [2, 3, 4]

The storage type of sqrt output depends upon the input storage type:

  • sqrt(default) = default

  • sqrt(row_sparse) = row_sparse

  • sqrt(csr) = csr

Defined in src/operator/tensor/elemwise_unary_op_basic.cc:L854

Parameters
  • data (NDArray) – The input array.

  • out (NDArray, optional) – The output NDArray to hold the result.

Returns

out – The output of this function.

Return type

NDArray or list of NDArrays