pytaco.tensor_cube_root

pytaco.tensor_cube_root(t1, out_format, dtype=None)

Takes the cube root of each input in the tensor.

Parameters
t1: tensor, array_like

input tensor or array_like object

out_format: format, mode_format, optional
  • If a format is specified, the result tensor is stored in the format out_format.

  • If a mode_format is specified, the result the result tensor has a with all of the dimensions stored in the mode_format passed in.

dtype: Datatype

The datatype of the output tensor.

Returns
cbrt: tensor

The element wise cbrt of the input tensor.

Examples

>>> import pytaco as pt
>>> pt.tensor_cube_root([4, -16, 9], out_format=pt.dense, dtype=pt.float32).toarray()
array([ 1.587401 , -2.5198421,  2.0800838], dtype=float32)