public class Nd4j extends Object
Modifier and Type | Field and Description |
---|---|
static String |
BLAS_OPS |
static String |
COMPLEX_CLASS_PROP |
static String |
dtype |
static String |
DTYPE |
static String |
LINALG_PROPS |
static String |
NDARRAY_FACTORY_CLASS |
static IComplexNumber |
NEG_UNIT |
static char |
ORDER |
static String |
ORDER_KEY |
static String |
REAL_CLASS_PROP |
static IComplexNumber |
UNIT |
static IComplexNumber |
ZERO |
Constructor and Description |
---|
Nd4j() |
Modifier and Type | Method and Description |
---|---|
static INDArray |
appendBias(INDArray... vectors) |
static INDArray |
arange(double begin,
double end)
Array of evenly spaced values.
|
static INDArray |
bilinearProducts(INDArray curr,
INDArray in)
Returns a column vector where each entry is the nth bilinear
product of the nth slices of the two tensors.
|
static IComplexNDArray |
complexFlatten(IComplexNDArray... flatten) |
static IComplexNDArray |
complexFlatten(List<IComplexNDArray> flatten) |
static IComplexNDArray |
complexLinSpace(int i,
int i1,
int i2) |
static IComplexNDArray |
complexOnes(int columns)
Creates an ndarray
|
static IComplexNDArray |
complexOnes(int[] shape)
Create an ndarray of ones
|
static INDArray |
complexOnes(int rows,
int columns)
Creates an ndarray
|
static IComplexNDArray |
complexScalar(Number value)
Create a scalar ndarray with the specified offset
|
static IComplexNDArray |
complexScalar(Number value,
int offset)
Create a scalar ndarray with the specified offset
|
static IComplexNDArray |
complexValueOf(int[] shape,
double value) |
static IComplexNDArray |
complexValueOf(int[] shape,
IComplexNumber value) |
static IComplexNDArray |
complexValueOf(int num,
double value) |
static IComplexNDArray |
complexValueOf(int num,
IComplexNumber value) |
static INDArray |
complexZeros(int columns)
Creates an ndarray
|
static IComplexNDArray |
complexZeros(int[] shape)
Create an ndarray of ones
|
static INDArray |
complexZeros(int rows,
int columns)
Creates a matrix of zeros
|
static IComplexNDArray |
concat(int dimension,
IComplexNDArray... toConcat)
Concatneate ndarrays along a dimension
|
static INDArray |
concat(int dimension,
INDArray... toConcat)
Concatneate ndarrays along a dimension
|
static void |
copy(INDArray a,
INDArray b)
Copy a to b
|
static INDArray |
create(double[] data)
Creates a row vector with the data
|
static INDArray |
create(double[][] data)
Create an ndarray based on the given data layout
|
static INDArray |
create(double[] data,
char order)
Creates a row vector with the data
|
static INDArray |
create(double[] data,
int[] shape)
Create an ndrray with the specified shape
|
static INDArray |
create(double[] data,
int[] shape,
char ordering)
Create an ndrray with the specified shape
|
static INDArray |
create(double[] data,
int[] shape,
int offset)
Creates an ndarray with the specified shape
|
static INDArray |
create(double[] data,
int[] shape,
int[] stride,
int offset)
Creates an ndarray with the specified shape
|
static INDArray |
create(double[] data,
int[] shape,
int[] stride,
int offset,
char ordering)
Creates an ndarray with the specified shape
|
static INDArray |
create(double[] data,
int[] shape,
int offset,
char ordering)
Creates an ndarray with the specified shape
|
static INDArray |
create(double[] data,
int rows,
int columns,
int[] stride,
int offset)
Creates an ndarray with the specified shape
|
static INDArray |
create(double[] data,
int rows,
int columns,
int[] stride,
int offset,
char ordering)
Creates an ndarray with the specified shape
|
static INDArray |
create(float[] data)
Creates a row vector with the data
|
static INDArray |
create(float[][] floats) |
static INDArray |
create(float[] data,
char order)
Creates a row vector with the data
|
static INDArray |
create(float[] data,
int[] shape)
Create an ndrray with the specified shape
|
static INDArray |
create(float[] data,
int[] shape,
char ordering)
Create an ndrray with the specified shape
|
static INDArray |
create(float[] data,
int[] shape,
char ordering,
int offset) |
static INDArray |
create(float[] data,
int[] shape,
int offset) |
static INDArray |
create(float[] data,
int[] shape,
int[] stride,
char ordering,
int offset) |
static INDArray |
create(float[] data,
int[] shape,
int[] stride,
int offset)
Creates an ndarray with the specified shape
|
static INDArray |
create(float[] data,
int[] shape,
int[] stride,
int offset,
char ordering)
Creates an ndarray with the specified shape
|
static INDArray |
create(float[] data,
int rows,
int columns,
int[] stride,
int offset)
Creates an ndarray with the specified shape
|
static INDArray |
create(float[] data,
int rows,
int columns,
int[] stride,
int offset,
char ordering)
Creates an ndarray with the specified shape
|
static INDArray |
create(int columns)
Creates a row vector with the specified number of columns
|
static INDArray |
create(int[] shape)
Creates an ndarray with the specified shape
|
static INDArray |
create(int[] shape,
char ordering)
Creates an ndarray with the specified shape
|
static INDArray |
create(int[] shape,
int[] stride)
Creates an ndarray with the specified shape
|
static INDArray |
create(int[] shape,
int[] stride,
char ordering)
Creates an ndarray with the specified shape
|
static INDArray |
create(int[] shape,
int[] stride,
int offset)
Creates an ndarray with the specified shape
|
static INDArray |
create(int[] shape,
int[] stride,
int offset,
char ordering)
Creates an ndarray with the specified shape
|
static INDArray |
create(int columns,
char order)
Creates a row vector with the specified number of columns
|
static INDArray |
create(int rows,
int columns)
Creates an ndarray with the specified shape
|
static INDArray |
create(int rows,
int columns,
char ordering)
Creates an ndarray with the specified shape
|
static INDArray |
create(int rows,
int columns,
int[] stride)
Creates an ndarray with the specified shape
|
static INDArray |
create(int rows,
int columns,
int[] stride,
char ordering)
Creates an ndarray with the specified shape
|
static INDArray |
create(int rows,
int columns,
int[] stride,
int offset)
Creates an ndarray with the specified shape
|
static INDArray |
create(int rows,
int columns,
int[] stride,
int offset,
char ordering)
Creates an ndarray with the specified shape
|
static INDArray |
create(List<INDArray> list,
int[] shape)
Creates an ndarray with the specified shape
|
static INDArray |
create(List<INDArray> list,
int[] shape,
char ordering)
Creates an ndarray with the specified shape
|
static IComplexNDArray |
createComplex(double[] data)
Creates an ndarray with the specified data
|
static IComplexNDArray |
createComplex(double[] data,
char order)
Creates an ndarray with the specified data
|
static IComplexNDArray |
createComplex(double[] data,
int[] shape)
Create an ndrray with the specified shape
|
static IComplexNDArray |
createComplex(double[] data,
int[] shape,
char ordering)
Create an ndrray with the specified shape
|
static IComplexNDArray |
createComplex(double[] data,
int[] shape,
int offset) |
static IComplexNDArray |
createComplex(double[] data,
int[] shape,
int[] stride)
Create an ndrray with the specified shape
|
static IComplexNDArray |
createComplex(double[] data,
int[] shape,
int[] stride,
char ordering)
Create an ndrray with the specified shape
|
static IComplexNDArray |
createComplex(double[] data,
int[] shape,
int[] stride,
int offset)
Creates a complex ndarray with the specified shape
|
static IComplexNDArray |
createComplex(double[] data,
int[] shape,
int[] stride,
int offset,
char ordering)
Creates a complex ndarray with the specified shape
|
static IComplexNDArray |
createComplex(double[] data,
int[] ints,
int offset,
char ordering) |
static IComplexNDArray |
createComplex(double[] data,
int rows,
int columns,
int[] stride,
int offset)
Creates a complex ndarray with the specified shape
|
static IComplexNDArray |
createComplex(double[] data,
int rows,
int columns,
int[] stride,
int offset,
char ordering)
Creates a complex ndarray with the specified shape
|
static IComplexNDArray |
createComplex(float[] dim) |
static IComplexNDArray |
createComplex(float[] data,
int[] shape)
Create an ndrray with the specified shape
|
static IComplexNDArray |
createComplex(float[] data,
int[] shape,
char ordering)
Create an ndrray with the specified shape
|
static IComplexNDArray |
createComplex(float[] data,
int[] shape,
int offset) |
static IComplexNDArray |
createComplex(float[] data,
int[] shape,
int[] stride)
Create an ndrray with the specified shape
|
static IComplexNDArray |
createComplex(float[] data,
int[] shape,
int[] stride,
char ordering)
Create an ndrray with the specified shape
|
static IComplexNDArray |
createComplex(float[] data,
int[] shape,
int[] stride,
int offset)
Creates a complex ndarray with the specified shape
|
static IComplexNDArray |
createComplex(float[] data,
int[] shape,
int[] stride,
int offset,
char ordering)
Creates a complex ndarray with the specified shape
|
static IComplexNDArray |
createComplex(float[] data,
int[] ints,
int offset,
char ordering) |
static IComplexNDArray |
createComplex(float[] data,
int rows,
int columns,
int[] stride,
int offset)
Creates a complex ndarray with the specified shape
|
static IComplexNDArray |
createComplex(float[] data,
int rows,
int columns,
int[] stride,
int offset,
char ordering)
Creates a complex ndarray with the specified shape
|
static IComplexNDArray |
createComplex(IComplexNumber[] data,
int[] shape)
Create a complex ndarray from the passed in indarray
|
static IComplexNDArray |
createComplex(IComplexNumber[] data,
int[] shape,
int offset,
char ordering)
Create a complex ndarray from the passed in indarray
|
static IComplexNDArray |
createComplex(INDArray arr)
Create a complex ndarray from the passed in indarray
|
static IComplexNDArray |
createComplex(int columns)
Creates an ndarray
|
static IComplexNDArray |
createComplex(int[] shape)
Creates a complex ndarray with the specified shape
|
static IComplexNDArray |
createComplex(int[] shape,
char ordering)
Creates a complex ndarray with the specified shape
|
static IComplexNDArray |
createComplex(int[] shape,
int[] stride)
Creates a complex ndarray with the specified shape
|
static IComplexNDArray |
createComplex(int[] shape,
int[] stride,
char ordering)
Creates a complex ndarray with the specified shape
|
static IComplexNDArray |
createComplex(int[] shape,
int[] stride,
int offset)
Creates a complex ndarray with the specified shape
|
static IComplexNDArray |
createComplex(int[] shape,
int[] stride,
int offset,
char ordering)
Creates a complex ndarray with the specified shape
|
static IComplexNDArray |
createComplex(int columns,
char order)
Creates an ndarray
|
static IComplexNDArray |
createComplex(int rows,
int columns)
Creates a complex ndarray with the specified shape
|
static IComplexNDArray |
createComplex(int rows,
int columns,
char ordering)
Creates a complex ndarray with the specified shape
|
static IComplexNDArray |
createComplex(int rows,
int columns,
int[] stride)
Creates a complex ndarray with the specified shape
|
static IComplexNDArray |
createComplex(int rows,
int columns,
int[] stride,
char ordering)
Creates a complex ndarray with the specified shape
|
static IComplexNDArray |
createComplex(int rows,
int columns,
int[] stride,
int offset)
Creates a complex ndarray with the specified shape
|
static IComplexNDArray |
createComplex(int rows,
int columns,
int[] stride,
int offset,
char ordering)
Creates a complex ndarray with the specified shape
|
static IComplexNDArray |
createComplex(List<IComplexNDArray> arrs,
int[] shape)
Create a complex ndarray from the passed in indarray
|
static IComplexFloat |
createComplexNumber(Number real,
Number imag)
Create float
|
static IComplexDouble |
createDouble(double real,
double imag)
Create an instance of a complex double
|
static IComplexFloat |
createFloat(float real,
float imag)
Create float
|
static String |
dataType()
Returns the data type used for the runtime
|
static INDArray |
eye(int n)
Create the identity ndarray
|
static NDArrayFactory |
factory() |
static BlasWrapper |
getBlasWrapper() |
static int[] |
getComplexStrides(int[] shape)
Get the strides based on the shape
and NDArrays.order()
|
static int[] |
getComplexStrides(int[] shape,
char order)
Get the strides for the given order and shape
|
static int[] |
getStrides(int[] shape)
Get the strides based on the shape
and NDArrays.order()
|
static int[] |
getStrides(int[] shape,
char order)
Get the strides for the given order and shape
|
static boolean |
hasInvalidNumber(INDArray num)
Returns true if the given ndarray has either
an infinite or nan
|
static INDArray |
hstack(INDArray... arrs)
Concatenates two matrices horizontally.
|
static INDArray |
linspace(int lower,
int upper,
int num)
Generate a linearly spaced vector
|
static INDArray |
ones(int columns)
Creates a row vector with the specified number of columns
|
static INDArray |
ones(int[] shape)
Create an ndarray of ones
|
static INDArray |
ones(int rows,
int columns)
Creates a row vector with the specified number of columns
|
static Character |
order()
Returns the ordering of the ndarrays
|
static INDArray |
rand(int[] shape)
Create a random ndarray with the given shape using
the current time as the seed
|
static INDArray |
rand(int[] shape,
float min,
float max,
org.apache.commons.math3.random.RandomGenerator rng)
Generates a random matrix between min and max
|
static INDArray |
rand(int[] shape,
long seed)
Create a random ndarray with the given shape using the given rng
|
static INDArray |
rand(int[] shape,
org.apache.commons.math3.random.RandomGenerator r)
Create a random ndarray with the given shape using the given rng
|
static INDArray |
rand(int[] shape,
org.apache.commons.math3.distribution.RealDistribution r)
Create a random ndarray with the given shape using the given rng
|
static INDArray |
rand(int rows,
int columns)
Create a random ndarray with the given shape using
the current time as the seed
|
static INDArray |
rand(int rows,
int columns,
float min,
float max,
org.apache.commons.math3.random.RandomGenerator rng)
Generates a random matrix between min and max
|
static INDArray |
rand(int rows,
int columns,
long seed)
Create a random ndarray with the given shape using the given rng
|
static INDArray |
rand(int rows,
int columns,
org.apache.commons.math3.random.RandomGenerator r)
Create a random ndarray with the given shape using the given rng
|
static INDArray |
randn(int[] shape)
Random normal using the current time stamp
as the seed
|
static INDArray |
randn(int[] shape,
long seed)
Random normal using the specified seed
|
static INDArray |
randn(int[] shape,
org.apache.commons.math3.random.RandomGenerator r)
Random normal using the given rng
|
static INDArray |
randn(int rows,
int columns)
Random normal using the current time stamp
as the seed
|
static INDArray |
randn(int rows,
int columns,
long seed)
Random normal using the specified seed
|
static INDArray |
randn(int rows,
int columns,
org.apache.commons.math3.random.RandomGenerator r)
Random normal using the given rng
|
static INDArray |
read(DataInputStream dis)
Read in an ndarray from a data input stream
|
static IComplexNDArray |
readComplex(DataInputStream dis)
Read in an ndarray from a data input stream
|
static IComplexNDArray |
repeat(IComplexNDArray n,
int num)
Create an n x (shape)
ndarray where the ndarray is repeated num times
|
static INDArray |
repeat(INDArray n,
int num)
Create an n x (shape)
ndarray where the ndarray is repeated num times
|
static INDArray |
reverse(INDArray reverse)
Reverses the passed in matrix such that m[0] becomes m[m.length - 1] etc
|
static INDArray |
rot(INDArray reverse)
Reverses the passed in matrix such that m[0] becomes m[m.length - 1] etc
|
static void |
rot90(INDArray toRotate)
Rotate a matrix 90 degrees
|
static INDArray |
scalar(double value)
Create a scalar nd array with the specified value and offset
|
static INDArray |
scalar(double value,
int offset)
Create a scalar nd array with the specified value and offset
|
static INDArray |
scalar(float value)
Create a scalar nd array with the specified value and offset
|
static INDArray |
scalar(float value,
int offset)
Create a scalar nd array with the specified value and offset
|
static IComplexNDArray |
scalar(IComplexDouble value)
Create a scalar nd array with the specified value and offset
|
static IComplexNDArray |
scalar(IComplexDouble value,
int offset)
Create a scalar nd array with the specified value and offset
|
static IComplexNDArray |
scalar(IComplexFloat value)
Create a scalar nd array with the specified value and offset
|
static IComplexNDArray |
scalar(IComplexFloat value,
int offset)
Create a scalar nd array with the specified value and offset
|
static IComplexNDArray |
scalar(IComplexNumber value)
Create a scalar ndarray with the specified offset
|
static IComplexNDArray |
scalar(IComplexNumber value,
int offset)
Create a scalar ndarray with the specified offset
|
static INDArray |
scalar(Number value)
Create a scalar ndarray with the specified offset
|
static INDArray |
scalar(Number value,
int offset)
Create a scalar ndarray with the specified offset
|
static void |
setBlasWrapper(BlasWrapper factory) |
static void |
setFactory(NDArrayFactory factory) |
static INDArray |
toFlattened(Collection<INDArray> matrices) |
static INDArray |
toFlattened(INDArray... matrices) |
static INDArray |
toFlattened(int length,
Iterator<? extends INDArray>... matrices) |
static INDArray |
valueArrayOf(int[] shape,
double value)
Creates an ndarray with the specified value
as the only value in the ndarray
|
static INDArray |
valueArrayOf(int num,
double value)
Creates an ndarray with the specified value
as the only value in the ndarray
|
static INDArray |
valueArrayOf(int rows,
int columns,
double value)
Creates a row vector with the specified number of columns
|
static INDArray |
vstack(INDArray... arrs)
Concatenates two matrices vertically.
|
static void |
write(INDArray arr,
DataOutputStream dataOutputStream)
Write an ndarray to the specified outputs tream
|
static void |
writeComplex(IComplexNDArray arr,
DataOutputStream dataOutputStream)
Write an ndarray to the specified outputs tream
|
static INDArray |
zeros(int columns)
Creates a row vector with the specified number of columns
|
static INDArray |
zeros(int[] shape)
Create an ndarray of zeros
|
static INDArray |
zeros(int rows,
int columns)
Creates a row vector with the specified number of columns
|
public static final String LINALG_PROPS
public static final String REAL_CLASS_PROP
public static final String COMPLEX_CLASS_PROP
public static final String DTYPE
public static final String BLAS_OPS
public static String dtype
public static char ORDER
public static final String ORDER_KEY
public static final String NDARRAY_FACTORY_CLASS
public static final IComplexNumber UNIT
public static final IComplexNumber ZERO
public static final IComplexNumber NEG_UNIT
public static NDArrayFactory factory()
public static void setFactory(NDArrayFactory factory)
public static void setBlasWrapper(BlasWrapper factory)
public static Character order()
public static String dataType()
public static BlasWrapper getBlasWrapper()
public static IComplexNDArray repeat(IComplexNDArray n, int num)
n
- the ndarray to replicatenum
- the number of copies to repeatpublic static INDArray repeat(INDArray n, int num)
n
- the ndarray to replicatenum
- the number of copies to repeatpublic static INDArray linspace(int lower, int upper, int num)
lower
- upper boundupper
- lower boundnum
- the step sizepublic static INDArray toFlattened(Collection<INDArray> matrices)
public static IComplexNDArray complexFlatten(List<IComplexNDArray> flatten)
public static IComplexNDArray complexFlatten(IComplexNDArray... flatten)
public static INDArray toFlattened(int length, Iterator<? extends INDArray>... matrices)
public static INDArray bilinearProducts(INDArray curr, INDArray in)
public static INDArray eye(int n)
n
- the number for the identitypublic static void rot90(INDArray toRotate)
toRotate
- the matrix to rotatepublic static INDArray read(DataInputStream dis) throws IOException
dis
- the data input stream to read fromIOException
public static void write(INDArray arr, DataOutputStream dataOutputStream) throws IOException
arr
- the array to writedataOutputStream
- the data output stream to write toIOException
public static INDArray create(double[][] data)
data
- the data to usepublic static IComplexNDArray readComplex(DataInputStream dis) throws IOException
dis
- the data input stream to read fromIOException
public static void writeComplex(IComplexNDArray arr, DataOutputStream dataOutputStream) throws IOException
arr
- the array to writedataOutputStream
- the data output stream to write toIOException
public static INDArray rot(INDArray reverse)
reverse
- the matrix to reversepublic static INDArray reverse(INDArray reverse)
reverse
- the matrix to reversepublic static INDArray arange(double begin, double end)
begin
- the begin of the rangeend
- the end of the rangepublic static IComplexFloat createComplexNumber(Number real, Number imag)
real
- real componentimag
- imag componentpublic static IComplexFloat createFloat(float real, float imag)
real
- real componentimag
- imag componentpublic static IComplexDouble createDouble(double real, double imag)
real
- the real componentimag
- the imaginary componentpublic static void copy(INDArray a, INDArray b)
a
- the origin matrixb
- the destination matrixpublic static INDArray rand(int[] shape, float min, float max, org.apache.commons.math3.random.RandomGenerator rng)
shape
- the number of rows of the matrixmin
- the minimum numbermax
- the maximum numberrng
- the rng to usepublic static INDArray rand(int rows, int columns, float min, float max, org.apache.commons.math3.random.RandomGenerator rng)
rows
- the number of rows of the matrixcolumns
- the number of columns in the matrixmin
- the minimum numbermax
- the maximum numberrng
- the rng to usepublic static IComplexNDArray createComplex(INDArray arr)
arr
- the arr to wrappublic static IComplexNDArray createComplex(IComplexNumber[] data, int[] shape)
data
- the data to wrappublic static IComplexNDArray createComplex(IComplexNumber[] data, int[] shape, int offset, char ordering)
data
- the data to wrappublic static IComplexNDArray createComplex(List<IComplexNDArray> arrs, int[] shape)
arrs
- the arr to wrappublic static INDArray rand(int rows, int columns, org.apache.commons.math3.random.RandomGenerator r)
rows
- the number of rows in the matrixcolumns
- the number of columns in the matrixr
- the random generator to usepublic static INDArray rand(int rows, int columns, long seed)
rows
- the number of rows in the matrixcolumns
- the columns of the ndarrayseed
- the seed to usepublic static INDArray rand(int rows, int columns)
rows
- the number of rows in the matrixcolumns
- the number of columns in the matrixpublic static INDArray randn(int rows, int columns, org.apache.commons.math3.random.RandomGenerator r)
rows
- the number of rows in the matrixcolumns
- the number of columns in the matrixr
- the random generator to usepublic static INDArray randn(int rows, int columns)
rows
- the number of rows in the matrixcolumns
- the number of columns in the matrixpublic static INDArray randn(int rows, int columns, long seed)
rows
- the number of rows in the matrixcolumns
- the number of columns in the matrixpublic static INDArray rand(int[] shape, org.apache.commons.math3.distribution.RealDistribution r)
shape
- the shape of the ndarrayr
- the random generator to usepublic static INDArray rand(int[] shape, org.apache.commons.math3.random.RandomGenerator r)
shape
- the shape of the ndarrayr
- the random generator to usepublic static INDArray rand(int[] shape, long seed)
shape
- the shape of the ndarrayseed
- the seed to usepublic static INDArray rand(int[] shape)
shape
- the shape of the ndarraypublic static INDArray randn(int[] shape, org.apache.commons.math3.random.RandomGenerator r)
shape
- the shape of the ndarrayr
- the random generator to usepublic static INDArray randn(int[] shape)
shape
- the shape of the ndarraypublic static INDArray randn(int[] shape, long seed)
shape
- the shape of the ndarraypublic static INDArray create(double[] data, char order)
data
- the columns of the ndarraypublic static INDArray create(float[] data, char order)
data
- the columns of the ndarraypublic static IComplexNDArray createComplex(double[] data, char order)
data
- the number of columns in the row vectorpublic static INDArray create(int columns, char order)
columns
- the columns of the ndarraypublic static IComplexNDArray createComplex(int columns, char order)
columns
- the number of columns in the row vectorpublic static INDArray create(double[] data)
data
- the columns of the ndarraypublic static INDArray create(float[] data)
data
- the columns of the ndarraypublic static IComplexNDArray createComplex(double[] data)
data
- the number of columns in the row vectorpublic static INDArray create(int columns)
columns
- the columns of the ndarraypublic static IComplexNDArray createComplex(int columns)
columns
- the number of columns in the row vectorpublic static boolean hasInvalidNumber(INDArray num)
num
- the ndarray to testpublic static INDArray zeros(int rows, int columns)
rows
- the rows of the ndarraycolumns
- the columns of the ndarraypublic static INDArray complexZeros(int rows, int columns)
rows
- te number of rows in the matrixcolumns
- the number of columns in the row vectorpublic static INDArray zeros(int columns)
columns
- the columns of the ndarraypublic static INDArray complexZeros(int columns)
columns
- the number of columns in the row vectorpublic static IComplexNDArray complexValueOf(int num, IComplexNumber value)
public static IComplexNDArray complexValueOf(int[] shape, IComplexNumber value)
public static IComplexNDArray complexValueOf(int num, double value)
public static IComplexNDArray complexValueOf(int[] shape, double value)
public static INDArray valueArrayOf(int[] shape, double value)
shape
- the shape of the ndarrayvalue
- the value to assignpublic static INDArray valueArrayOf(int num, double value)
num
- number of columnsvalue
- the value to assignpublic static INDArray valueArrayOf(int rows, int columns, double value)
rows
- the number of rows in the matrixcolumns
- the columns of the ndarrayvalue
- the value to assignpublic static INDArray ones(int rows, int columns)
rows
- the number of rows in the matrixcolumns
- the columns of the ndarraypublic static INDArray complexOnes(int rows, int columns)
rows
- the number of rows in the matrixcolumns
- the number of columns in the row vectorpublic static INDArray ones(int columns)
columns
- the columns of the ndarraypublic static IComplexNDArray complexOnes(int columns)
columns
- the number of columns in the row vectorpublic static INDArray hstack(INDArray... arrs)
arrs
- the first matrix to concatpublic static INDArray vstack(INDArray... arrs)
arrs
- public static INDArray concat(int dimension, INDArray... toConcat)
dimension
- the dimension to concatneate alongtoConcat
- the ndarrays to concatpublic static IComplexNDArray concat(int dimension, IComplexNDArray... toConcat)
dimension
- the dimension to concatneate alongtoConcat
- the ndarrays to concatpublic static INDArray zeros(int[] shape)
shape
- the shape of the ndarraypublic static IComplexNDArray complexZeros(int[] shape)
shape
- the shape of the ndarraypublic static INDArray ones(int[] shape)
shape
- the shape of the ndarraypublic static IComplexNDArray complexOnes(int[] shape)
shape
- the shape of the ndarraypublic static IComplexNDArray createComplex(float[] data, int rows, int columns, int[] stride, int offset)
data
- the data to use with the ndarrayrows
- the rows of the ndarraycolumns
- the columns of the ndarraystride
- the stride for the ndarrayoffset
- the offset of the ndarraypublic static INDArray create(float[] data, int rows, int columns, int[] stride, int offset)
data
- the data to use with the ndarrayrows
- the rows of the ndarraycolumns
- the columns of the ndarraystride
- the stride for the ndarrayoffset
- the offset of the ndarraypublic static IComplexNDArray createComplex(float[] data, int[] shape, int[] stride, int offset)
data
- the data to use with the ndarrayshape
- the shape of the ndarraystride
- the stride for the ndarrayoffset
- the offset of the ndarraypublic static INDArray create(float[] data, int[] shape, int[] stride, int offset)
shape
- the shape of the ndarraystride
- the stride for the ndarrayoffset
- the offset of the ndarraypublic static INDArray create(double[] data, int[] shape)
data
- the data to use with tne ndarrayshape
- the shape of the ndarraypublic static INDArray create(float[] data, int[] shape)
data
- the data to use with tne ndarrayshape
- the shape of the ndarraypublic static IComplexNDArray createComplex(double[] data, int[] shape)
data
- the data to use with tne ndarrayshape
- the shape of the ndarraypublic static IComplexNDArray createComplex(float[] data, int[] shape)
data
- the data to use with tne ndarrayshape
- the shape of the ndarraypublic static IComplexNDArray createComplex(double[] data, int[] shape, int[] stride)
data
- the data to use with tne ndarrayshape
- the shape of the ndarraystride
- the stride for the ndarraypublic static IComplexNDArray createComplex(float[] data, int[] shape, int[] stride)
data
- the data to use with tne ndarrayshape
- the shape of the ndarraystride
- the stride for the ndarraypublic static IComplexNDArray createComplex(double[] data, int rows, int columns, int[] stride, int offset)
rows
- the rows of the ndarraycolumns
- the columns of the ndarraystride
- the stride for the ndarrayoffset
- the offset of the ndarraypublic static INDArray create(double[] data, int rows, int columns, int[] stride, int offset)
data
- the data to use with tne ndarrayrows
- the rows of the ndarraycolumns
- the columns of the ndarraystride
- the stride for the ndarrayoffset
- the offset of the ndarraypublic static IComplexNDArray createComplex(double[] data, int[] shape, int[] stride, int offset)
shape
- the shape of the ndarraystride
- the stride for the ndarrayoffset
- the offset of the ndarraypublic static INDArray create(double[] data, int[] shape, int offset)
shape
- the shape of the ndarrayoffset
- the offset of the ndarraypublic static INDArray create(double[] data, int[] shape, int offset, char ordering)
shape
- the shape of the ndarrayoffset
- the offset of the ndarraypublic static INDArray create(double[] data, int[] shape, int[] stride, int offset)
shape
- the shape of the ndarraystride
- the stride for the ndarrayoffset
- the offset of the ndarraypublic static INDArray create(List<INDArray> list, int[] shape)
shape
- the shape of the ndarraypublic static IComplexNDArray createComplex(int rows, int columns, int[] stride, int offset)
rows
- the rows of the ndarraycolumns
- the columns of the ndarraystride
- the stride for the ndarrayoffset
- the offset of the ndarraypublic static INDArray create(int rows, int columns, int[] stride, int offset)
rows
- the rows of the ndarraycolumns
- the columns of the ndarraystride
- the stride for the ndarrayoffset
- the offset of the ndarraypublic static IComplexNDArray createComplex(int[] shape, int[] stride, int offset)
shape
- the shape of the ndarraystride
- the stride for the ndarrayoffset
- the offset of the ndarraypublic static INDArray create(int[] shape, int[] stride, int offset)
shape
- the shape of the ndarraystride
- the stride for the ndarrayoffset
- the offset of the ndarraypublic static IComplexNDArray createComplex(int rows, int columns, int[] stride)
rows
- the rows of the ndarraycolumns
- the columns of the ndarraystride
- the stride for the ndarraypublic static INDArray create(int rows, int columns, int[] stride)
rows
- the rows of the ndarraycolumns
- the columns of the ndarraystride
- the stride for the ndarraypublic static IComplexNDArray createComplex(int[] shape, int[] stride)
shape
- the shape of the ndarraystride
- the stride for the ndarraypublic static INDArray create(int[] shape, int[] stride)
shape
- the shape of the ndarraystride
- the stride for the ndarraypublic static IComplexNDArray createComplex(int rows, int columns)
rows
- the rows of the ndarraycolumns
- the columns of the ndarraypublic static INDArray create(int rows, int columns)
rows
- the rows of the ndarraycolumns
- the columns of the ndarraypublic static IComplexNDArray createComplex(int[] shape)
shape
- the shape of the ndarraypublic static INDArray create(int[] shape)
shape
- the shape of the ndarraypublic static INDArray scalar(Number value, int offset)
value
- the value to initialize the scalar withoffset
- the offset of the ndarraypublic static IComplexNDArray complexScalar(Number value, int offset)
value
- the value to initialize the scalar withoffset
- the offset of the ndarraypublic static IComplexNDArray complexScalar(Number value)
value
- the value to initialize the scalar withpublic static INDArray scalar(float value, int offset)
value
- the value of the scalaroffset
- the offset of the ndarraypublic static INDArray scalar(double value, int offset)
value
- the value of the scalaroffset
- the offset of the ndarraypublic static INDArray scalar(Number value)
value
- the value to initialize the scalar withpublic static INDArray scalar(float value)
value
- the value of the scalar
= * @return the scalar nd arraypublic static INDArray scalar(double value)
value
- the value of the scalar
= * @return the scalar nd arraypublic static IComplexNDArray scalar(IComplexNumber value, int offset)
value
- the value to initialize the scalar withoffset
- the offset of the ndarraypublic static IComplexNDArray scalar(IComplexFloat value)
value
- the value of the scalarpublic static IComplexNDArray scalar(IComplexDouble value)
value
- the value of the scalar
= * @return the scalar nd arraypublic static IComplexNDArray scalar(IComplexNumber value)
value
- the value to initialize the scalar withpublic static IComplexNDArray scalar(IComplexFloat value, int offset)
value
- the value of the scalaroffset
- the offset of the ndarraypublic static IComplexNDArray scalar(IComplexDouble value, int offset)
value
- the value of the scalaroffset
- the offset of the ndarraypublic static int[] getStrides(int[] shape, char order)
shape
- the shape of the ndarrayorder
- the order to getScalar the strides forpublic static int[] getStrides(int[] shape)
shape
- the shape of the ndarraypublic static int[] getComplexStrides(int[] shape, char order)
shape
- the shape of the ndarrayorder
- the order to getScalar the strides forpublic static int[] getComplexStrides(int[] shape)
shape
- the shape of the ndarraypublic static IComplexNDArray createComplex(float[] data, int rows, int columns, int[] stride, int offset, char ordering)
data
- the data to use with the ndarrayrows
- the rows of the ndarraycolumns
- the columns of the ndarraystride
- the stride for the ndarrayoffset
- the offset of the ndarraypublic static INDArray create(float[] data, int rows, int columns, int[] stride, int offset, char ordering)
data
- the data to use with the ndarrayrows
- the rows of the ndarraycolumns
- the columns of the ndarraystride
- the stride for the ndarrayoffset
- the offset of the ndarraypublic static IComplexNDArray createComplex(float[] data, int[] shape, int[] stride, int offset, char ordering)
data
- the data to use with the ndarrayshape
- the shape of the ndarraystride
- the stride for the ndarrayoffset
- the offset of the ndarraypublic static INDArray create(float[] data, int[] shape, int[] stride, int offset, char ordering)
shape
- the shape of the ndarraystride
- the stride for the ndarrayoffset
- the offset of the ndarraypublic static INDArray create(double[] data, int[] shape, char ordering)
data
- the data to use with tne ndarrayshape
- the shape of the ndarraypublic static INDArray create(float[] data, int[] shape, char ordering)
data
- the data to use with tne ndarrayshape
- the shape of the ndarraypublic static IComplexNDArray createComplex(double[] data, int[] shape, char ordering)
data
- the data to use with tne ndarrayshape
- the shape of the ndarraypublic static IComplexNDArray createComplex(float[] data, int[] shape, char ordering)
data
- the data to use with tne ndarrayshape
- the shape of the ndarraypublic static IComplexNDArray createComplex(double[] data, int[] shape, int[] stride, char ordering)
data
- the data to use with tne ndarrayshape
- the shape of the ndarraystride
- the stride for the ndarraypublic static IComplexNDArray createComplex(float[] data, int[] shape, int[] stride, char ordering)
data
- the data to use with tne ndarrayshape
- the shape of the ndarraystride
- the stride for the ndarraypublic static IComplexNDArray createComplex(double[] data, int rows, int columns, int[] stride, int offset, char ordering)
rows
- the rows of the ndarraycolumns
- the columns of the ndarraystride
- the stride for the ndarrayoffset
- the offset of the ndarraypublic static INDArray create(double[] data, int rows, int columns, int[] stride, int offset, char ordering)
data
- the data to use with tne ndarrayrows
- the rows of the ndarraycolumns
- the columns of the ndarraystride
- the stride for the ndarrayoffset
- the offset of the ndarraypublic static IComplexNDArray createComplex(double[] data, int[] shape, int[] stride, int offset, char ordering)
shape
- the shape of the ndarraystride
- the stride for the ndarrayoffset
- the offset of the ndarraypublic static INDArray create(double[] data, int[] shape, int[] stride, int offset, char ordering)
shape
- the shape of the ndarraystride
- the stride for the ndarrayoffset
- the offset of the ndarraypublic static INDArray create(List<INDArray> list, int[] shape, char ordering)
shape
- the shape of the ndarraypublic static IComplexNDArray createComplex(int rows, int columns, int[] stride, int offset, char ordering)
rows
- the rows of the ndarraycolumns
- the columns of the ndarraystride
- the stride for the ndarrayoffset
- the offset of the ndarraypublic static INDArray create(int rows, int columns, int[] stride, int offset, char ordering)
rows
- the rows of the ndarraycolumns
- the columns of the ndarraystride
- the stride for the ndarrayoffset
- the offset of the ndarraypublic static IComplexNDArray createComplex(int[] shape, int[] stride, int offset, char ordering)
shape
- the shape of the ndarraystride
- the stride for the ndarrayoffset
- the offset of the ndarraypublic static INDArray create(int[] shape, int[] stride, int offset, char ordering)
shape
- the shape of the ndarraystride
- the stride for the ndarrayoffset
- the offset of the ndarraypublic static IComplexNDArray createComplex(int rows, int columns, int[] stride, char ordering)
rows
- the rows of the ndarraycolumns
- the columns of the ndarraystride
- the stride for the ndarraypublic static INDArray create(int rows, int columns, int[] stride, char ordering)
rows
- the rows of the ndarraycolumns
- the columns of the ndarraystride
- the stride for the ndarraypublic static IComplexNDArray createComplex(int[] shape, int[] stride, char ordering)
shape
- the shape of the ndarraystride
- the stride for the ndarraypublic static INDArray create(int[] shape, int[] stride, char ordering)
shape
- the shape of the ndarraystride
- the stride for the ndarraypublic static IComplexNDArray createComplex(int rows, int columns, char ordering)
rows
- the rows of the ndarraycolumns
- the columns of the ndarraypublic static INDArray create(int rows, int columns, char ordering)
rows
- the rows of the ndarraycolumns
- the columns of the ndarraypublic static IComplexNDArray createComplex(int[] shape, char ordering)
shape
- the shape of the ndarraypublic static INDArray create(int[] shape, char ordering)
shape
- the shape of the ndarraypublic static IComplexNDArray createComplex(double[] data, int[] ints, int offset, char ordering)
public static IComplexNDArray createComplex(double[] data, int[] shape, int offset)
public static INDArray create(float[] data, int[] shape, int offset)
public static IComplexNDArray createComplex(float[] data, int[] ints, int offset, char ordering)
public static IComplexNDArray createComplex(float[] dim)
public static IComplexNDArray createComplex(float[] data, int[] shape, int offset)
public static INDArray create(float[][] floats)
public static IComplexNDArray complexLinSpace(int i, int i1, int i2)
public static INDArray create(float[] data, int[] shape, int[] stride, char ordering, int offset)
public static INDArray create(float[] data, int[] shape, char ordering, int offset)
Copyright © 2014. All Rights Reserved.