org.nd4j.linalg.factory
Interface NDArrayFactory
-
- All Known Implementing Classes:
- BaseNDArrayFactory, JblasNDArrayFactory
public interface NDArrayFactoryCreation of ndarrays via classpath discovery.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method and Description INDArrayappendBias(INDArray... vectors)INDArrayarange(double begin, double end)Array of evenly spaced values.INDArraybilinearProducts(INDArray curr, INDArray in)Returns a column vector where each entry is the nth bilinear product of the nth slices of the two tensors.IComplexNDArraycomplexFlatten(IComplexNDArray[] flatten)IComplexNDArraycomplexFlatten(java.util.List<IComplexNDArray> flatten)IComplexNDArraycomplexOnes(int columns)Creates an ndarrayIComplexNDArraycomplexOnes(int[] shape)Create an ndarray of onesINDArraycomplexOnes(int rows, int columns)Creates an ndarrayIComplexNDArraycomplexScalar(java.lang.Number value)Create a scalar ndarray with the specified offsetIComplexNDArraycomplexScalar(java.lang.Number value, int offset)Create a scalar ndarray with the specified offsetIComplexNDArraycomplexValueOf(int[] shape, double value)Creates an shape ndarray with the specified valueIComplexNDArraycomplexValueOf(int[] shape, IComplexNumber value)Creates an shape ndarray with the specified valueIComplexNDArraycomplexValueOf(int num, double value)Creates an 1 x num ndarray with the specified valueIComplexNDArraycomplexValueOf(int num, IComplexNumber value)Creates an 1 x num ndarray with the specified valueIComplexNDArraycomplexZeros(int columns)Creates an ndarrayIComplexNDArraycomplexZeros(int[] shape)Create an ndarray of onesIComplexNDArraycomplexZeros(int rows, int columns)Creates a matrix of zerosIComplexNDArrayconcat(int dimension, IComplexNDArray... toConcat)Concatneate ndarrays along a dimensionINDArrayconcat(int dimension, INDArray... toConcat)Concatneate ndarrays along a dimensionvoidcopy(INDArray a, INDArray b)Copy a to bINDArraycreate(DataBuffer data)Creates a row vector with the dataINDArraycreate(DataBuffer data, int[] shape)Create an ndrray with the specified shapeINDArraycreate(DataBuffer buffer, int[] shape, int offset)INDArraycreate(DataBuffer data, int[] shape, int[] stride, int offset)Creates an ndarray with the specified shapeINDArraycreate(DataBuffer data, int[] newShape, int[] newStride, int offset, char ordering)INDArraycreate(DataBuffer data, int rows, int columns, int[] stride, int offset)Creates an ndarray with the specified shapeINDArraycreate(double[] data)Creates a row vector with the dataINDArraycreate(double[][] data)Create an ndarray with the given data layoutINDArraycreate(double[] data, int[] shape)Create an ndrray with the specified shapeINDArraycreate(double[] data, int[] shape, char ordering)INDArraycreate(double[] data, int[] shape, int offset)INDArraycreate(double[] data, int[] shape, int[] stride, int offset)Creates an ndarray with the specified shapeINDArraycreate(double[] data, int[] shape, int[] stride, int offset, char ordering)INDArraycreate(double[] data, int rows, int columns, int[] stride, int offset)Creates an ndarray with the specified shapeINDArraycreate(float[] data)Creates a row vector with the dataINDArraycreate(float[][] floats)INDArraycreate(float[] data, int[] shape)Create an ndrray with the specified shapeINDArraycreate(float[] data, int[] shape, int offset)INDArraycreate(float[] data, int[] shape, int[] stride, int offset)Creates an ndarray with the specified shapeINDArraycreate(float[] data, int[] shape, int[] stride, int offset, char ordering)INDArraycreate(float[] data, int[] shape, int offset, java.lang.Character order)INDArraycreate(float[] data, int rows, int columns, int[] stride, int offset)INDArraycreate(float[] data, int rows, int columns, int[] stride, int offset, char ordering)INDArraycreate(int columns)Creates a row vector with the specified number of columnsINDArraycreate(int[] shape)Creates an ndarray with the specified shapeINDArraycreate(int[] shape, char ordering)INDArraycreate(int[] shape, int[] stride)Creates an ndarray with the specified shapeINDArraycreate(int[] shape, int[] stride, int offset)Creates an ndarray with the specified shapeINDArraycreate(int rows, int columns)Creates an ndarray with the specified shapeINDArraycreate(int rows, int columns, char ordering)INDArraycreate(int rows, int columns, int[] stride)Creates an ndarray with the specified shapeINDArraycreate(int rows, int columns, int[] stride, int offset)Creates an ndarray with the specified shapeINDArraycreate(java.util.List<INDArray> list, int[] shape)Creates an ndarray with the specified shapeINDArraycreate(java.util.List<INDArray> list, int[] shape, char ordering)DataBuffercreateBuffer(DataBuffer[] buffers)DataBuffercreateBuffer(double[] concat)DataBuffercreateBuffer(float[] concat)IComplexNDArraycreateComplex(DataBuffer data)Creates an ndarray with the specified dataIComplexNDArraycreateComplex(DataBuffer data, int[] shape)Create an ndrray with the specified shapeIComplexNDArraycreateComplex(DataBuffer buffer, int[] shape, int offset)IComplexNDArraycreateComplex(DataBuffer data, int[] shape, int[] stride)Create an ndrray with the specified shapeIComplexNDArraycreateComplex(DataBuffer data, int[] shape, int[] stride, int offset)Creates a complex ndarray with the specified shapeIComplexNDArraycreateComplex(DataBuffer data, int[] newDims, int[] newStrides, int offset, char ordering)IComplexNDArraycreateComplex(DataBuffer buffer, int[] shape, int offset, char ordering)IComplexNDArraycreateComplex(DataBuffer data, int rows, int columns, int[] stride, int offset)Creates a complex ndarray with the specified shapeIComplexNDArraycreateComplex(double[] data)Creates an ndarray with the specified dataIComplexNDArraycreateComplex(double[] data, int[] shape)Create an ndrray with the specified shapeIComplexNDArraycreateComplex(double[] data, int[] shape, int offset)IComplexNDArraycreateComplex(double[] data, int[] shape, int[] stride)Create an ndrray with the specified shapeIComplexNDArraycreateComplex(double[] data, int[] shape, int[] stride, int offset)Creates a complex ndarray with the specified shapeIComplexNDArraycreateComplex(double[] data, int[] shape, int[] stride, int offset, char ordering)Create a complex ndarray with the given dataIComplexNDArraycreateComplex(double[] data, int[] shape, int offset, char ordering)IComplexNDArraycreateComplex(double[] data, int rows, int columns, int[] stride, int offset)Creates a complex ndarray with the specified shapeIComplexNDArraycreateComplex(float[] dim)IComplexNDArraycreateComplex(float[] data, java.lang.Character order)IComplexNDArraycreateComplex(float[] data, int[] shape)Create an ndrray with the specified shapeIComplexNDArraycreateComplex(float[] data, int[] shape, int offset)IComplexNDArraycreateComplex(float[] data, int[] shape, int[] stride)Create an ndrray with the specified shapeIComplexNDArraycreateComplex(float[] data, int[] shape, int[] stride, int offset)IComplexNDArraycreateComplex(float[] data, int[] shape, int[] stride, int offset, char ordering)IComplexNDArraycreateComplex(float[] data, int[] shape, int offset, char ordering)IComplexNDArraycreateComplex(float[] data, int rows, int columns, int[] stride, int offset)Creates a complex ndarray with the specified shapeIComplexNDArraycreateComplex(IComplexNumber[] data, int[] shape)Create a complex ndarray from the passed in indarrayIComplexNDArraycreateComplex(IComplexNumber[] data, int[] shape, char ordering)Creates a complex ndarray with the specified shapeIComplexNDArraycreateComplex(IComplexNumber[] data, int[] shape, int[] stride, char ordering)Creates a complex ndarray with the specified shapeIComplexNDArraycreateComplex(IComplexNumber[] data, int[] shape, int[] stride, int offset)Creates a complex ndarray with the specified shapeIComplexNDArraycreateComplex(IComplexNumber[] data, int[] shape, int[] stride, int offset, char ordering)Creates a complex ndarray with the specified shapeIComplexNDArraycreateComplex(IComplexNumber[] data, int[] shape, int offset, char ordering)Creates a complex ndarray with the specified shapeIComplexNDArraycreateComplex(INDArray arr)Create a complex ndarray from the passed in indarrayIComplexNDArraycreateComplex(int columns)Creates an ndarrayIComplexNDArraycreateComplex(int[] shape)Creates a complex ndarray with the specified shapeIComplexNDArraycreateComplex(int[] shape, int[] stride)Creates a complex ndarray with the specified shapeIComplexNDArraycreateComplex(int[] shape, int[] stride, int offset)Creates a complex ndarray with the specified shapeIComplexNDArraycreateComplex(int rows, int columns)Creates a complex ndarray with the specified shapeIComplexNDArraycreateComplex(int rows, int columns, int[] stride)Creates a complex ndarray with the specified shapeIComplexNDArraycreateComplex(int rows, int columns, int[] stride, int offset)Creates a complex ndarray with the specified shapeIComplexNDArraycreateComplex(java.util.List<IComplexNDArray> arrs, int[] shape)Create a complex ndarray from the passed in indarrayIComplexDoublecreateDouble(double real, double imag)Create an instance of a complex doubleIComplexFloatcreateFloat(float real, float imag)Create floatjava.lang.Stringdtype()Returns the data type for this ndarrayINDArrayeye(int n)Create the identity ndarrayINDArrayhstack(INDArray... arrs)Concatenates two matrices horizontally.INDArraylinspace(int lower, int upper, int num)Generate a linearly spaced vectorINDArrayones(int columns)Creates a row vector with the specified number of columnsINDArrayones(int[] shape)Create an ndarray of onesINDArrayones(int rows, int columns)Creates a row vector with the specified number of columnscharorder()Returns the order for this ndarray for internal data storageINDArrayrand(int[] shape)Create a random ndarray with the given shape using the current time as the seedINDArrayrand(int[] shape, double min, double max, RandomGenerator rng)INDArrayrand(int[] shape, float min, float max, RandomGenerator rng)Generates a random matrix between min and maxINDArrayrand(int[] shape, long seed)Create a random ndarray with the given shape using the given rngINDArrayrand(int[] shape, RandomGenerator r)Create a random ndarray with the given shape using the given rngINDArrayrand(int[] shape, RealDistribution r)Create a random ndarray with the given shape using the given rngINDArrayrand(int rows, int columns)Create a random ndarray with the given shape using the current time as the seedINDArrayrand(int rows, int columns, double min, double max, RandomGenerator rng)INDArrayrand(int rows, int columns, float min, float max, RandomGenerator rng)Generates a random matrix between min and maxINDArrayrand(int rows, int columns, long seed)Create a random ndarray with the given shape using the given rngINDArrayrand(int rows, int columns, RandomGenerator r)Create a random ndarray with the given shape using the given rngINDArrayrandn(int[] shape)Random normal using the current time stamp as the seedINDArrayrandn(int[] shape, long seed)Random normal using the specified seedINDArrayrandn(int[] shape, RandomGenerator r)Random normal using the given rngINDArrayrandn(int rows, int columns)Random normal using the current time stamp as the seedINDArrayrandn(int rows, int columns, long seed)Random normal using the specified seedINDArrayrandn(int rows, int columns, RandomGenerator r)Random normal using the given rngINDArrayreverse(INDArray reverse)Reverses the passed in matrix such that m[0] becomes m[m.length - 1] etcINDArrayrot(INDArray reverse)Reverses the passed in matrix such that m[0] becomes m[m.length - 1] etcvoidrot90(INDArray toRotate)Rotate a matrix 90 degreesINDArrayscalar(double value)Create a scalar nd array with the specified value and offsetINDArrayscalar(double value, int offset)Create a scalar nd array with the specified value and offsetINDArrayscalar(float value)Create a scalar nd array with the specified value and offsetINDArrayscalar(float value, int offset)Create a scalar nd array with the specified value and offsetIComplexNDArrayscalar(IComplexDouble value)Create a scalar nd array with the specified value and offsetIComplexNDArrayscalar(IComplexDouble value, int offset)Create a scalar nd array with the specified value and offsetIComplexNDArrayscalar(IComplexFloat value)Create a scalar nd array with the specified value and offsetIComplexNDArrayscalar(IComplexFloat value, int offset)Create a scalar nd array with the specified value and offsetIComplexNDArrayscalar(IComplexNumber value)Create a scalar ndarray with the specified offsetIComplexNDArrayscalar(IComplexNumber value, int offset)Create a scalar ndarray with the specified offsetINDArrayscalar(java.lang.Number value)Create a scalar ndarray with the specified offsetINDArrayscalar(java.lang.Number value, int offset)Create a scalar ndarray with the specified offsetvoidsetDType(java.lang.String dtype)Sets the data typevoidsetOrder(char order)Sets the order.INDArraytoFlattened(java.util.Collection<INDArray> matrices)Returns a flattened ndarray with all of the elements in each ndarray regardless of dimensionINDArraytoFlattened(INDArray... matrices)INDArraytoFlattened(int length, java.util.Iterator<? extends INDArray>... matrices)Returns a flattened ndarray with all of the elements in each ndarray regardless of dimensionINDArrayvalueArrayOf(int[] shape, double value)Creates an ndarray with the specified value as the only value in the ndarrayINDArrayvalueArrayOf(int rows, int columns, double value)Creates a row vector with the specified number of columnsINDArrayvstack(INDArray... arrs)Concatenates two matrices vertically.INDArrayzeros(int columns)Creates a row vector with the specified number of columnsINDArrayzeros(int[] shape)Create an ndarray of zerosINDArrayzeros(int rows, int columns)Creates a row vector with the specified number of columns
-
-
-
Field Detail
-
FORTRAN
static final char FORTRAN
- See Also:
- Constant Field Values
-
C
static final char C
- See Also:
- Constant Field Values
-
-
Method Detail
-
complexValueOf
IComplexNDArray complexValueOf(int num, IComplexNumber value)
Creates an 1 x num ndarray with the specified value- Parameters:
num- the number of columnsvalue- the value to assign- Returns:
- a complex ndarray of the specified size and value
-
complexValueOf
IComplexNDArray complexValueOf(int[] shape, IComplexNumber value)
Creates an shape ndarray with the specified value- Parameters:
shape- the shape of the ndarrayvalue- the value to assign- Returns:
- a complex ndarray of the specified size and value
-
complexValueOf
IComplexNDArray complexValueOf(int num, double value)
Creates an 1 x num ndarray with the specified value- Parameters:
num- the number of columnsvalue- the value to assign- Returns:
- a complex ndarray of the specified size and value
-
complexValueOf
IComplexNDArray complexValueOf(int[] shape, double value)
Creates an shape ndarray with the specified value- Parameters:
shape- the shape of the ndarrayvalue- the value to assign- Returns:
- a complex ndarray of the specified size and value
-
setOrder
void setOrder(char order)
Sets the order. Primarily for testing purposes- Parameters:
order-
-
setDType
void setDType(java.lang.String dtype)
Sets the data type- Parameters:
dtype-
-
order
char order()
Returns the order for this ndarray for internal data storage- Returns:
- the order (c or f)
-
dtype
java.lang.String dtype()
Returns the data type for this ndarray- Returns:
- the data type for this ndarray
-
createComplex
IComplexNDArray createComplex(int rows, int columns, int[] stride, int offset)
Creates a complex ndarray with the specified shape- Parameters:
rows- the rows of the ndarraycolumns- the columns of the ndarraystride- the stride for the ndarrayoffset- the offset of the ndarray- Returns:
- the instance
-
linspace
INDArray linspace(int lower, int upper, int num)
Generate a linearly spaced vector- Parameters:
lower- upper boundupper- lower boundnum- the step size- Returns:
- the linearly spaced vector
-
createBuffer
DataBuffer createBuffer(double[] concat)
-
createBuffer
DataBuffer createBuffer(float[] concat)
-
toFlattened
INDArray toFlattened(java.util.Collection<INDArray> matrices)
Returns a flattened ndarray with all of the elements in each ndarray regardless of dimension- Parameters:
matrices- the ndarrays to use- Returns:
- a flattened ndarray of the elements in the order of titerating over the ndarray and the linear view of each
-
toFlattened
INDArray toFlattened(int length, java.util.Iterator<? extends INDArray>... matrices)
Returns a flattened ndarray with all of the elements in each ndarray regardless of dimension- Parameters:
matrices- the ndarrays to use- Returns:
- a flattened ndarray of the elements in the order of titerating over the ndarray and the linear view of each
-
createBuffer
DataBuffer createBuffer(DataBuffer[] buffers)
-
bilinearProducts
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.
-
eye
INDArray eye(int n)
Create the identity ndarray- Parameters:
n- the number for the identity- Returns:
-
rot90
void rot90(INDArray toRotate)
Rotate a matrix 90 degrees- Parameters:
toRotate- the matrix to rotate
-
rot
INDArray rot(INDArray reverse)
Reverses the passed in matrix such that m[0] becomes m[m.length - 1] etc- Parameters:
reverse- the matrix to reverse- Returns:
- the reversed matrix
-
reverse
INDArray reverse(INDArray reverse)
Reverses the passed in matrix such that m[0] becomes m[m.length - 1] etc- Parameters:
reverse- the matrix to reverse- Returns:
- the reversed matrix
-
arange
INDArray arange(double begin, double end)
Array of evenly spaced values. Returns a row vector- Parameters:
begin- the begin of the rangeend- the end of the range- Returns:
- the range vector
-
createFloat
IComplexFloat createFloat(float real, float imag)
Create float- Parameters:
real- real componentimag- imag component- Returns:
-
createDouble
IComplexDouble createDouble(double real, double imag)
Create an instance of a complex double- Parameters:
real- the real componentimag- the imaginary component- Returns:
- a new imaginary double with the specified real and imaginary components
-
copy
void copy(INDArray a, INDArray b)
Copy a to b- Parameters:
a- the origin matrixb- the destination matrix
-
rand
INDArray rand(int[] shape, float min, float max, RandomGenerator rng)
Generates a random matrix between min and max- Parameters:
shape- the number of rows of the matrixmin- the minimum numbermax- the maximum numberrng- the rng to use- Returns:
- a drandom matrix of the specified shape and range
-
rand
INDArray rand(int rows, int columns, float min, float max, RandomGenerator rng)
Generates a random matrix between min and max- Parameters:
rows- the number of rows of the matrixcolumns- the number of columns in the matrixmin- the minimum numbermax- the maximum numberrng- the rng to use- Returns:
- a drandom matrix of the specified shape and range
-
create
INDArray create(double[][] data)
Create an ndarray with the given data layout- Parameters:
data- the data to create the ndarray with- Returns:
- the ndarray with the given data layout
-
createComplex
IComplexNDArray createComplex(INDArray arr)
Create a complex ndarray from the passed in indarray- Parameters:
arr- the arr to wrap- Returns:
- the complex ndarray with the specified ndarray as the real components
-
createComplex
IComplexNDArray createComplex(IComplexNumber[] data, int[] shape)
Create a complex ndarray from the passed in indarray- Parameters:
data- the data to wrap- Returns:
- the complex ndarray with the specified ndarray as the real components
-
createComplex
IComplexNDArray createComplex(java.util.List<IComplexNDArray> arrs, int[] shape)
Create a complex ndarray from the passed in indarray- Parameters:
arrs- the arr to wrap- Returns:
- the complex ndarray with the specified ndarray as the real components
-
concat
INDArray concat(int dimension, INDArray... toConcat)
Concatneate ndarrays along a dimension- Parameters:
dimension- the dimension to concatneate alongtoConcat- the ndarrays to concateneate- Returns:
- the concatneated ndarrays
-
concat
IComplexNDArray concat(int dimension, IComplexNDArray... toConcat)
Concatneate ndarrays along a dimension- Parameters:
dimension- the dimension to concatneate alongtoConcat- the ndarrays to concateneate- Returns:
- the concatneated ndarrays
-
rand
INDArray rand(int rows, int columns, RandomGenerator r)
Create a random ndarray with the given shape using the given rng- Parameters:
rows- the number of rows in the matrixcolumns- the number of columns in the matrixr- the random generator to use- Returns:
- the random ndarray with the specified shape
-
rand
INDArray rand(int rows, int columns, long seed)
Create a random ndarray with the given shape using the given rng- Parameters:
rows- the number of rows in the matrixcolumns- the columns of the ndarrayseed- the seed to use- Returns:
- the random ndarray with the specified shape
-
rand
INDArray rand(int rows, int columns)
Create a random ndarray with the given shape using the current time as the seed- Parameters:
rows- the number of rows in the matrixcolumns- the number of columns in the matrix- Returns:
- the random ndarray with the specified shape
-
randn
INDArray randn(int rows, int columns, RandomGenerator r)
Random normal using the given rng- Parameters:
rows- the number of rows in the matrixcolumns- the number of columns in the matrixr- the random generator to use- Returns:
-
randn
INDArray randn(int rows, int columns)
Random normal using the current time stamp as the seed- Parameters:
rows- the number of rows in the matrixcolumns- the number of columns in the matrix- Returns:
-
randn
INDArray randn(int rows, int columns, long seed)
Random normal using the specified seed- Parameters:
rows- the number of rows in the matrixcolumns- the number of columns in the matrix- Returns:
-
rand
INDArray rand(int[] shape, RealDistribution r)
Create a random ndarray with the given shape using the given rng- Parameters:
shape- the shape of the ndarrayr- the random generator to use- Returns:
- the random ndarray with the specified shape
-
rand
INDArray rand(int[] shape, RandomGenerator r)
Create a random ndarray with the given shape using the given rng- Parameters:
shape- the shape of the ndarrayr- the random generator to use- Returns:
- the random ndarray with the specified shape
-
rand
INDArray rand(int[] shape, long seed)
Create a random ndarray with the given shape using the given rng- Parameters:
shape- the shape of the ndarrayseed- the seed to use- Returns:
- the random ndarray with the specified shape
-
rand
INDArray rand(int[] shape)
Create a random ndarray with the given shape using the current time as the seed- Parameters:
shape- the shape of the ndarray- Returns:
- the random ndarray with the specified shape
-
randn
INDArray randn(int[] shape, RandomGenerator r)
Random normal using the given rng- Parameters:
shape- the shape of the ndarrayr- the random generator to use- Returns:
-
randn
INDArray randn(int[] shape)
Random normal using the current time stamp as the seed- Parameters:
shape- the shape of the ndarray- Returns:
-
randn
INDArray randn(int[] shape, long seed)
Random normal using the specified seed- Parameters:
shape- the shape of the ndarray- Returns:
-
create
INDArray create(double[] data)
Creates a row vector with the data- Parameters:
data- the columns of the ndarray- Returns:
- the created ndarray
-
create
INDArray create(float[] data)
Creates a row vector with the data- Parameters:
data- the columns of the ndarray- Returns:
- the created ndarray
-
createComplex
IComplexNDArray createComplex(double[] data)
Creates an ndarray with the specified data- Parameters:
data- the number of columns in the row vector- Returns:
- ndarray
-
create
INDArray create(DataBuffer data)
Creates a row vector with the data- Parameters:
data- the columns of the ndarray- Returns:
- the created ndarray
-
createComplex
IComplexNDArray createComplex(DataBuffer data)
Creates an ndarray with the specified data- Parameters:
data- the number of columns in the row vector- Returns:
- ndarray
-
create
INDArray create(int columns)
Creates a row vector with the specified number of columns- Parameters:
columns- the columns of the ndarray- Returns:
- the created ndarray
-
createComplex
IComplexNDArray createComplex(int columns)
Creates an ndarray- Parameters:
columns- the number of columns in the row vector- Returns:
- ndarray
-
zeros
INDArray zeros(int rows, int columns)
Creates a row vector with the specified number of columns- Parameters:
rows- the rows of the ndarraycolumns- the columns of the ndarray- Returns:
- the created ndarray
-
complexZeros
IComplexNDArray complexZeros(int rows, int columns)
Creates a matrix of zeros- Parameters:
rows- te number of rows in the matrixcolumns- the number of columns in the row vector- Returns:
- ndarray
-
zeros
INDArray zeros(int columns)
Creates a row vector with the specified number of columns- Parameters:
columns- the columns of the ndarray- Returns:
- the created ndarray
-
complexZeros
IComplexNDArray complexZeros(int columns)
Creates an ndarray- Parameters:
columns- the number of columns in the row vector- Returns:
- ndarray
-
valueArrayOf
INDArray valueArrayOf(int[] shape, double value)
Creates an ndarray with the specified value as the only value in the ndarray- Parameters:
shape- the shape of the ndarrayvalue- the value to assign- Returns:
- the created ndarray
-
valueArrayOf
INDArray valueArrayOf(int rows, int columns, double value)
Creates a row vector with the specified number of columns- Parameters:
rows- the number of rows in the matrixcolumns- the columns of the ndarrayvalue- the value to assign- Returns:
- the created ndarray
-
ones
INDArray ones(int rows, int columns)
Creates a row vector with the specified number of columns- Parameters:
rows- the number of rows in the matrixcolumns- the columns of the ndarray- Returns:
- the created ndarray
-
complexOnes
INDArray complexOnes(int rows, int columns)
Creates an ndarray- Parameters:
rows- the number of rows in the matrixcolumns- the number of columns in the row vector- Returns:
- ndarray
-
ones
INDArray ones(int columns)
Creates a row vector with the specified number of columns- Parameters:
columns- the columns of the ndarray- Returns:
- the created ndarray
-
complexOnes
IComplexNDArray complexOnes(int columns)
Creates an ndarray- Parameters:
columns- the number of columns in the row vector- Returns:
- ndarray
-
hstack
INDArray hstack(INDArray... arrs)
Concatenates two matrices horizontally. Matrices must have identical numbers of rows.- Parameters:
arrs-
-
vstack
INDArray vstack(INDArray... arrs)
Concatenates two matrices vertically. Matrices must have identical numbers of columns.- Parameters:
arrs-
-
zeros
INDArray zeros(int[] shape)
Create an ndarray of zeros- Parameters:
shape- the shape of the ndarray- Returns:
- an ndarray with ones filled in
-
complexZeros
IComplexNDArray complexZeros(int[] shape)
Create an ndarray of ones- Parameters:
shape- the shape of the ndarray- Returns:
- an ndarray with ones filled in
-
ones
INDArray ones(int[] shape)
Create an ndarray of ones- Parameters:
shape- the shape of the ndarray- Returns:
- an ndarray with ones filled in
-
complexOnes
IComplexNDArray complexOnes(int[] shape)
Create an ndarray of ones- Parameters:
shape- the shape of the ndarray- Returns:
- an ndarray with ones filled in
-
createComplex
IComplexNDArray createComplex(float[] data, int rows, int columns, int[] stride, int offset)
Creates a complex ndarray with the specified shape- Parameters:
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 ndarray- Returns:
- the instance
-
createComplex
IComplexNDArray createComplex(DataBuffer data, int rows, int columns, int[] stride, int offset)
Creates a complex ndarray with the specified shape- Parameters:
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 ndarray- Returns:
- the instance
-
create
INDArray create(DataBuffer data, int rows, int columns, int[] stride, int offset)
Creates an ndarray with the specified shape- Parameters:
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 ndarray- Returns:
- the instance
-
createComplex
IComplexNDArray createComplex(DataBuffer data, int[] shape, int[] stride, int offset)
Creates a complex ndarray with the specified shape- Parameters:
data- the data to use with the ndarrayshape- the shape of the ndarraystride- the stride for the ndarrayoffset- the offset of the ndarray- Returns:
- the instance
-
create
INDArray create(float[] data, int rows, int columns, int[] stride, int offset)
-
createComplex
IComplexNDArray createComplex(IComplexNumber[] data, int[] shape, int[] stride, int offset)
Creates a complex ndarray with the specified shape- Parameters:
data- the data to use with the ndarrayshape- the shape of the ndarraystride- the stride for the ndarrayoffset- the offset of the ndarray- Returns:
- the instance
-
createComplex
IComplexNDArray createComplex(IComplexNumber[] data, int[] shape, int[] stride, int offset, char ordering)
Creates a complex ndarray with the specified shape- Parameters:
data- the data to use with the ndarrayshape- the shape of the ndarraystride- the stride for the ndarrayoffset- the offset of the ndarray- Returns:
- the instance
-
createComplex
IComplexNDArray createComplex(IComplexNumber[] data, int[] shape, int[] stride, char ordering)
Creates a complex ndarray with the specified shape- Parameters:
data- the data to use with the ndarrayshape- the shape of the ndarraystride- the stride for the ndarray- Returns:
- the instance
-
createComplex
IComplexNDArray createComplex(IComplexNumber[] data, int[] shape, int offset, char ordering)
Creates a complex ndarray with the specified shape- Parameters:
data- the data to use with the ndarrayshape- the shape of the ndarrayoffset- the stride for the ndarray- Returns:
- the instance
-
createComplex
IComplexNDArray createComplex(IComplexNumber[] data, int[] shape, char ordering)
Creates a complex ndarray with the specified shape- Parameters:
data- the data to use with the ndarrayshape- the shape of the ndarray- Returns:
- the instance
-
create
INDArray create(float[] data, int[] shape, int[] stride, int offset)
Creates an ndarray with the specified shape- Parameters:
shape- the shape of the ndarraystride- the stride for the ndarrayoffset- the offset of the ndarray- Returns:
- the instance
-
create
INDArray create(double[] data, int[] shape)
Create an ndrray with the specified shape- Parameters:
data- the data to use with tne ndarrayshape- the shape of the ndarray- Returns:
- the created ndarray
-
create
INDArray create(float[] data, int[] shape)
Create an ndrray with the specified shape- Parameters:
data- the data to use with tne ndarrayshape- the shape of the ndarray- Returns:
- the created ndarray
-
createComplex
IComplexNDArray createComplex(double[] data, int[] shape)
Create an ndrray with the specified shape- Parameters:
data- the data to use with tne ndarrayshape- the shape of the ndarray- Returns:
- the created ndarray
-
createComplex
IComplexNDArray createComplex(float[] data, int[] shape)
Create an ndrray with the specified shape- Parameters:
data- the data to use with tne ndarrayshape- the shape of the ndarray- Returns:
- the created ndarray
-
createComplex
IComplexNDArray createComplex(double[] data, int[] shape, int[] stride)
Create an ndrray with the specified shape- Parameters:
data- the data to use with tne ndarrayshape- the shape of the ndarraystride- the stride for the ndarray- Returns:
- the created ndarray
-
createComplex
IComplexNDArray createComplex(float[] data, int[] shape, int[] stride)
Create an ndrray with the specified shape- Parameters:
data- the data to use with tne ndarrayshape- the shape of the ndarraystride- the stride for the ndarray- Returns:
- the created ndarray
-
createComplex
IComplexNDArray createComplex(double[] data, int rows, int columns, int[] stride, int offset)
Creates a complex ndarray with the specified shape- Parameters:
rows- the rows of the ndarraycolumns- the columns of the ndarraystride- the stride for the ndarrayoffset- the offset of the ndarray- Returns:
- the instance
-
create
INDArray create(double[] data, int rows, int columns, int[] stride, int offset)
Creates an ndarray with the specified shape- Parameters:
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 ndarray- Returns:
- the instance
-
createComplex
IComplexNDArray createComplex(double[] data, int[] shape, int[] stride, int offset)
Creates a complex ndarray with the specified shape- Parameters:
shape- the shape of the ndarraystride- the stride for the ndarrayoffset- the offset of the ndarray- Returns:
- the instance
-
create
INDArray create(double[] data, int[] shape, int[] stride, int offset)
Creates an ndarray with the specified shape- Parameters:
shape- the shape of the ndarraystride- the stride for the ndarrayoffset- the offset of the ndarray- Returns:
- the instance
-
create
INDArray create(DataBuffer data, int[] shape)
Create an ndrray with the specified shape- Parameters:
data- the data to use with tne ndarrayshape- the shape of the ndarray- Returns:
- the created ndarray
-
createComplex
IComplexNDArray createComplex(DataBuffer data, int[] shape)
Create an ndrray with the specified shape- Parameters:
data- the data to use with tne ndarrayshape- the shape of the ndarray- Returns:
- the created ndarray
-
createComplex
IComplexNDArray createComplex(DataBuffer data, int[] shape, int[] stride)
Create an ndrray with the specified shape- Parameters:
data- the data to use with tne ndarrayshape- the shape of the ndarraystride- the stride for the ndarray- Returns:
- the created ndarray
-
create
INDArray create(DataBuffer data, int[] shape, int[] stride, int offset)
Creates an ndarray with the specified shape- Parameters:
shape- the shape of the ndarraystride- the stride for the ndarrayoffset- the offset of the ndarray- Returns:
- the instance
-
create
INDArray create(java.util.List<INDArray> list, int[] shape)
Creates an ndarray with the specified shape- Parameters:
shape- the shape of the ndarray- Returns:
- the instance
-
create
INDArray create(int rows, int columns, int[] stride, int offset)
Creates an ndarray with the specified shape- Parameters:
rows- the rows of the ndarraycolumns- the columns of the ndarraystride- the stride for the ndarrayoffset- the offset of the ndarray- Returns:
- the instance
-
createComplex
IComplexNDArray createComplex(int[] shape, int[] stride, int offset)
Creates a complex ndarray with the specified shape- Parameters:
shape- the shape of the ndarraystride- the stride for the ndarrayoffset- the offset of the ndarray- Returns:
- the instance
-
create
INDArray create(int[] shape, int[] stride, int offset)
Creates an ndarray with the specified shape- Parameters:
shape- the shape of the ndarraystride- the stride for the ndarrayoffset- the offset of the ndarray- Returns:
- the instance
-
createComplex
IComplexNDArray createComplex(int rows, int columns, int[] stride)
Creates a complex ndarray with the specified shape- Parameters:
rows- the rows of the ndarraycolumns- the columns of the ndarraystride- the stride for the ndarray- Returns:
- the instance
-
create
INDArray create(int rows, int columns, int[] stride)
Creates an ndarray with the specified shape- Parameters:
rows- the rows of the ndarraycolumns- the columns of the ndarraystride- the stride for the ndarray- Returns:
- the instance
-
createComplex
IComplexNDArray createComplex(int[] shape, int[] stride)
Creates a complex ndarray with the specified shape- Parameters:
shape- the shape of the ndarraystride- the stride for the ndarray- Returns:
- the instance
-
create
INDArray create(int[] shape, int[] stride)
Creates an ndarray with the specified shape- Parameters:
shape- the shape of the ndarraystride- the stride for the ndarray- Returns:
- the instance
-
createComplex
IComplexNDArray createComplex(int rows, int columns)
Creates a complex ndarray with the specified shape- Parameters:
rows- the rows of the ndarraycolumns- the columns of the ndarray- Returns:
- the instance
-
create
INDArray create(int rows, int columns)
Creates an ndarray with the specified shape- Parameters:
rows- the rows of the ndarraycolumns- the columns of the ndarray- Returns:
- the instance
-
createComplex
IComplexNDArray createComplex(int[] shape)
Creates a complex ndarray with the specified shape- Parameters:
shape- the shape of the ndarray- Returns:
- the instance
-
create
INDArray create(int[] shape)
Creates an ndarray with the specified shape- Parameters:
shape- the shape of the ndarray- Returns:
- the instance
-
scalar
INDArray scalar(java.lang.Number value, int offset)
Create a scalar ndarray with the specified offset- Parameters:
value- the value to initialize the scalar withoffset- the offset of the ndarray- Returns:
- the created ndarray
-
complexScalar
IComplexNDArray complexScalar(java.lang.Number value, int offset)
Create a scalar ndarray with the specified offset- Parameters:
value- the value to initialize the scalar withoffset- the offset of the ndarray- Returns:
- the created ndarray
-
complexScalar
IComplexNDArray complexScalar(java.lang.Number value)
Create a scalar ndarray with the specified offset- Parameters:
value- the value to initialize the scalar with- Returns:
- the created ndarray
-
scalar
INDArray scalar(float value, int offset)
Create a scalar nd array with the specified value and offset- Parameters:
value- the value of the scalaroffset- the offset of the ndarray- Returns:
- the scalar nd array
-
scalar
INDArray scalar(double value, int offset)
Create a scalar nd array with the specified value and offset- Parameters:
value- the value of the scalaroffset- the offset of the ndarray- Returns:
- the scalar nd array
-
scalar
INDArray scalar(java.lang.Number value)
Create a scalar ndarray with the specified offset- Parameters:
value- the value to initialize the scalar with- Returns:
- the created ndarray
-
scalar
INDArray scalar(float value)
Create a scalar nd array with the specified value and offset- Parameters:
value- the value of the scalar = * @return the scalar nd array
-
scalar
INDArray scalar(double value)
Create a scalar nd array with the specified value and offset- Parameters:
value- the value of the scalar = * @return the scalar nd array
-
scalar
IComplexNDArray scalar(IComplexNumber value, int offset)
Create a scalar ndarray with the specified offset- Parameters:
value- the value to initialize the scalar withoffset- the offset of the ndarray- Returns:
- the created ndarray
-
scalar
IComplexNDArray scalar(IComplexFloat value)
Create a scalar nd array with the specified value and offset- Parameters:
value- the value of the scalar- Returns:
- the scalar nd array
-
scalar
IComplexNDArray scalar(IComplexDouble value)
Create a scalar nd array with the specified value and offset- Parameters:
value- the value of the scalar = * @return the scalar nd array
-
scalar
IComplexNDArray scalar(IComplexNumber value)
Create a scalar ndarray with the specified offset- Parameters:
value- the value to initialize the scalar with- Returns:
- the created ndarray
-
scalar
IComplexNDArray scalar(IComplexFloat value, int offset)
Create a scalar nd array with the specified value and offset- Parameters:
value- the value of the scalaroffset- the offset of the ndarray- Returns:
- the scalar nd array
-
scalar
IComplexNDArray scalar(IComplexDouble value, int offset)
Create a scalar nd array with the specified value and offset- Parameters:
value- the value of the scalaroffset- the offset of the ndarray- Returns:
- the scalar nd array
-
createComplex
IComplexNDArray createComplex(double[] data, int[] shape, int[] stride, int offset, char ordering)
Create a complex ndarray with the given data- Parameters:
data- the data to use with tne ndarrayshape- the shape of the ndarraystride- the stride for the ndarrayoffset- the offset of the ndarrayordering- the ordering for the ndarray- Returns:
- the created complex ndarray
-
createComplex
IComplexNDArray createComplex(double[] data, int[] shape, int offset, char ordering)
- Parameters:
data-shape-offset-ordering-- Returns:
-
createComplex
IComplexNDArray createComplex(DataBuffer buffer, int[] shape, int offset, char ordering)
-
createComplex
IComplexNDArray createComplex(double[] data, int[] shape, int offset)
- Parameters:
data-shape-offset-- Returns:
-
createComplex
IComplexNDArray createComplex(DataBuffer buffer, int[] shape, int offset)
-
create
INDArray create(float[] data, int[] shape, int offset)
-
createComplex
IComplexNDArray createComplex(float[] data, int[] shape, int offset, char ordering)
-
createComplex
IComplexNDArray createComplex(float[] data, int[] shape, int offset)
-
createComplex
IComplexNDArray createComplex(float[] data, int[] shape, int[] stride, int offset, char ordering)
-
create
INDArray create(float[][] floats)
-
createComplex
IComplexNDArray createComplex(float[] dim)
-
create
INDArray create(float[] data, int[] shape, int[] stride, int offset, char ordering)
-
complexFlatten
IComplexNDArray complexFlatten(java.util.List<IComplexNDArray> flatten)
-
complexFlatten
IComplexNDArray complexFlatten(IComplexNDArray[] flatten)
-
create
INDArray create(DataBuffer buffer, int[] shape, int offset)
-
createComplex
IComplexNDArray createComplex(float[] data, int[] shape, int[] stride, int offset)
-
create
INDArray create(int[] shape, char ordering)
-
create
INDArray create(DataBuffer data, int[] newShape, int[] newStride, int offset, char ordering)
-
createComplex
IComplexNDArray createComplex(DataBuffer data, int[] newDims, int[] newStrides, int offset, char ordering)
-
rand
INDArray rand(int rows, int columns, double min, double max, RandomGenerator rng)
-
createComplex
IComplexNDArray createComplex(float[] data, java.lang.Character order)
-
create
INDArray create(float[] data, int[] shape, int offset, java.lang.Character order)
-
create
INDArray create(float[] data, int rows, int columns, int[] stride, int offset, char ordering)
-
create
INDArray create(double[] data, int[] shape, char ordering)
-
create
INDArray create(double[] data, int[] shape, int offset)
-
create
INDArray create(double[] data, int[] shape, int[] stride, int offset, char ordering)
-
rand
INDArray rand(int[] shape, double min, double max, RandomGenerator rng)
-
create
INDArray create(int rows, int columns, char ordering)
-
-
DMelt 3.0 © DataMelt by jWork.ORG