Private
isCalculates the angle (in radians) from a specified point to the coordinate origin as measured from the positive x-axis. Values are returned as a float in the range from PI to -PI.
the arc tangent of each tensor element
the x-coordinate(s) used for computing the arc tangent
Private
complexPads a tensor with a given value and paddings.
the padded tensor
an array prescribing how much to pad [before, after] along each tensor axis
Optional
constantValue: number(optional) the pad value to use
Facilitates exponential expressions. The pow() method is an efficient way of multiplying tensors by themselves (or their reciprocals) in large quantities.
the exponentiated tensor
the power by which to raise each tensor element
Splits a tensor into sub tensors.
the split tensor
either an integer indicating the number of splits along the axis or an array of integers containing the sizes of each output tensor along the axis. If a number then it must evenly divide the axis length; otherwise the sum of sizes must match axis length.
Optional
axis: number(optional) the dimension along which to split
Calculates the square root of each tensor element. The square root of a number is always positive, even though there may be a valid negative root. The square root s of number a is such that s*s = a. It is the opposite of squaring.
the square root of each tensor element
Subtracts two rows of a matrix.
the resulting matrix
the index of the row being subtracted from
the index of the row being subtracted from the other row
(optional) the constant multiplier for r1
Static
complexStatic
eyeStatic
fillStatic
linspaceStatic
onesStatic
randomStatic
randomCreates a tensor filled with normally distributed random numbers.
the filled tensor
the shape of tensor
Optional
mean: number(optional) the mean
Optional
sd: number(optional) the standard deviation
Static
rangeCreates a tensor filled with numbers in the range provided.
the filled tensor
the lower bound (inclusive)
the upper bound (exclusive)
Optional
step: number(optional) the integer spacing between values
Static
stackStatic
zerosGenerated using TypeDoc
A class to describe a tensor, a generalization of vectors and matrices. Tensors can be thought of as (possibly) multidimensional arrays that support many useful operations. They are applied throughout mathematics, physics, engineering, and computer science.