public interface NDArrayFactory
| Modifier and Type | Method and Description |
|---|---|
INDArray |
accumulate(INDArray target,
INDArray... arrays)
This method sums given arrays to target
|
INDArray |
appendBias(INDArray... vectors) |
INDArray |
arange(double begin,
double end,
double step)
Array of evenly spaced values.
|
INDArray |
average(Collection<INDArray> arrays)
This method averages input arrays, and returns averaged array
|
INDArray |
average(INDArray[] arrays)
This method averages input arrays, and returns averaged array
|
INDArray |
average(INDArray target,
Collection<INDArray> arrays)
This method averages input arrays, and returns averaged array
|
INDArray |
average(INDArray target,
INDArray[] arrays)
This method averages input arrays, and returns averaged array
|
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.
|
Blas |
blas()
Return extra blas operations
|
INDArray |
concat(int dimension,
INDArray... toConcat)
Concatneate ndarrays along a dimension
|
DataBuffer |
convertDataEx(DataTypeEx typeSrc,
DataBuffer source,
DataTypeEx typeDst) |
void |
convertDataEx(DataTypeEx typeSrc,
DataBuffer source,
DataTypeEx typeDst,
DataBuffer target) |
INDArray |
convertDataEx(DataTypeEx typeSrc,
INDArray source,
DataTypeEx typeDst) |
void |
convertDataEx(DataTypeEx typeSrc,
org.bytedeco.javacpp.Pointer source,
DataTypeEx typeDst,
DataBuffer buffer) |
void |
convertDataEx(DataTypeEx typeSrc,
org.bytedeco.javacpp.Pointer source,
DataTypeEx typeDst,
org.bytedeco.javacpp.Pointer target,
long length) |
org.bytedeco.javacpp.Pointer |
convertToNumpy(INDArray array)
Convert an
INDArray
to a numpy array. |
void |
copy(INDArray a,
INDArray b)
Copy a to b
|
INDArray |
create(boolean[] data,
long[] shape,
long[] stride,
char order,
DataType dataType,
MemoryWorkspace workspace) |
INDArray |
create(boolean[] data,
long[] shape,
long[] stride,
DataType dataType,
MemoryWorkspace workspace) |
INDArray |
create(byte[] data,
long[] shape,
long[] stride,
char order,
DataType dataType,
MemoryWorkspace workspace) |
INDArray |
create(byte[] data,
long[] shape,
long[] stride,
DataType dataType,
MemoryWorkspace workspace) |
INDArray |
create(Collection<String> strings,
long[] shape,
char order) |
INDArray |
create(DataBuffer data)
Creates a row vector with the data
|
INDArray |
create(DataBuffer data,
int[] shape)
Create an ndrray with the specified shape
|
INDArray |
create(DataBuffer buffer,
int[] shape,
int[] stride,
char order,
long offset) |
INDArray |
create(DataBuffer data,
int[] shape,
int[] stride,
long offset)
Creates an ndarray with the specified shape
|
INDArray |
create(DataBuffer data,
int[] newShape,
int[] newStride,
long offset,
char ordering) |
INDArray |
create(DataBuffer buffer,
int[] shape,
long offset) |
INDArray |
create(DataBuffer data,
long[] shape) |
INDArray |
create(DataBuffer data,
long[] shape,
long[] stride,
long offset) |
INDArray |
create(DataBuffer data,
long[] newShape,
long[] newStride,
long offset,
char ordering) |
INDArray |
create(DataBuffer data,
long[] newShape,
long[] newStride,
long offset,
char ordering,
DataType dataType) |
INDArray |
create(DataBuffer data,
long[] newShape,
long[] newStride,
long offset,
long ews,
char ordering) |
INDArray |
create(DataBuffer data,
long rows,
long columns,
int[] stride,
long offset)
Creates an ndarray with the specified shape
|
INDArray |
create(DataType dataType,
long[] shape,
char ordering,
MemoryWorkspace workspace) |
INDArray |
create(DataType dataType,
long[] shape,
long[] strides,
char ordering,
MemoryWorkspace workspace) |
INDArray |
create(DataType dataType,
long[] shape,
long[] paddings,
long[] paddingOffsets,
char ordering,
MemoryWorkspace workspace)
Create an ndArray with padded Buffer
|
INDArray |
create(double[] data)
Creates a row vector with the data
|
INDArray |
create(double[][] data)
Create an ndarray with the given data layout
|
INDArray |
create(double[][] data,
char ordering)
Create a matrix from the given
data and ordering
|
INDArray |
create(double[] data,
char order) |
INDArray |
create(double[] data,
int[] shape)
Create an ndrray with the specified shape
|
INDArray |
create(double[] data,
int[] shape,
char ordering) |
INDArray |
create(double[] data,
int[] shape,
int[] stride,
char order,
long offset) |
INDArray |
create(double[] data,
int[] shape,
int[] stride,
long offset)
Creates an ndarray with the specified shape
|
INDArray |
create(double[] data,
int[] shape,
int[] stride,
long offset,
char ordering) |
INDArray |
create(double[] data,
int[] shape,
long offset) |
INDArray |
create(double[] data,
long[] shape) |
INDArray |
create(double[] data,
long[] shape,
char ordering) |
INDArray |
create(double[] data,
long[] shape,
long[] stride,
char order,
DataType dataType,
MemoryWorkspace workspace) |
INDArray |
create(double[] data,
long[] shape,
long[] stride,
DataType dataType,
MemoryWorkspace workspace) |
INDArray |
create(double[] data,
long[] shape,
long[] stride,
long offset) |
INDArray |
create(double[] data,
long[] shape,
long[] stride,
long offset,
char ordering) |
INDArray |
create(double[] data,
long[] shape,
long offset,
Character order) |
INDArray |
create(double[] data,
long rows,
long columns,
int[] stride,
long offset)
Creates an ndarray with the specified shape
|
INDArray |
create(float[] data)
Creates a row vector with the data
|
INDArray |
create(float[][] floats) |
INDArray |
create(float[][] data,
char ordering) |
INDArray |
create(float[] data,
char order) |
INDArray |
create(float[] data,
int[] shape)
Create an ndrray with the specified shape
|
INDArray |
create(float[] data,
int[] shape,
char ordering) |
INDArray |
create(float[] data,
int[] shape,
int[] stride,
char order,
long offset) |
INDArray |
create(float[] data,
int[] shape,
int[] stride,
long offset)
Creates an ndarray with the specified shape
|
INDArray |
create(float[] data,
int[] shape,
int[] stride,
long offset,
char ordering) |
INDArray |
create(float[] data,
int[] shape,
long offset) |
INDArray |
create(float[] data,
int[] shape,
long offset,
Character order) |
INDArray |
create(float[] data,
long[] shape) |
INDArray |
create(float[] data,
long[] shape,
char ordering) |
INDArray |
create(float[] data,
long[] shape,
long[] stride,
char order,
DataType dataType) |
INDArray |
create(float[] data,
long[] shape,
long[] stride,
char order,
DataType dataType,
MemoryWorkspace workspace) |
INDArray |
create(float[] data,
long[] shape,
long[] stride,
char order,
long offset) |
INDArray |
create(float[] data,
long[] shape,
long[] stride,
DataType dataType,
MemoryWorkspace workspace) |
INDArray |
create(float[] data,
long[] shape,
long[] stride,
long offset) |
INDArray |
create(float[] data,
long[] shape,
long[] stride,
long offset,
char ordering) |
INDArray |
create(float[] data,
long[] shape,
long offset,
Character order) |
INDArray |
create(float[] data,
long rows,
long columns,
int[] stride,
long offset) |
INDArray |
create(float[] data,
long rows,
long columns,
int[] stride,
long offset,
char ordering) |
INDArray |
create(int[] shape)
Creates an ndarray with the specified shape
|
INDArray |
create(int[] shape,
char ordering) |
INDArray |
create(int[] shape,
DataBuffer buffer)
Create an ndarray with the given shape
and data
|
INDArray |
create(int[] shape,
DataType dataType,
MemoryWorkspace workspace) |
INDArray |
create(int[] shape,
int[] stride)
Creates an ndarray with the specified shape
|
INDArray |
create(int[] shape,
int[] ints1,
int[] stride,
char order,
long offset) |
INDArray |
create(int[] ints,
int[] ints1,
int[] stride,
long offset) |
INDArray |
create(int[] shape,
int[] stride,
long offset)
Creates an ndarray with the specified shape
|
INDArray |
create(int[] shape,
int[] stride,
long offset,
char ordering) |
INDArray |
create(int[] data,
long[] shape,
long[] stride,
char order,
DataType dataType,
MemoryWorkspace workspace) |
INDArray |
create(int[] data,
long[] shape,
long[] stride,
DataType dataType,
MemoryWorkspace workspace) |
INDArray |
create(List<INDArray> list,
int[] shape)
Creates an ndarray with the specified shape
|
INDArray |
create(List<INDArray> list,
int[] shape,
char ordering) |
INDArray |
create(List<INDArray> list,
long[] shape) |
INDArray |
create(List<INDArray> list,
long[] shape,
char ordering) |
INDArray |
create(long columns)
Creates a row vector with the specified number of columns
|
INDArray |
create(long[] shape) |
INDArray |
create(long[] shape,
char ordering) |
INDArray |
create(long[] shape,
long[] stride) |
INDArray |
create(long[] shape,
long[] stride,
long offset) |
INDArray |
create(long[] data,
long[] shape,
long[] stride,
char order,
DataType dataType,
MemoryWorkspace workspace) |
INDArray |
create(long[] data,
long[] shape,
long[] stride,
DataType dataType,
MemoryWorkspace workspace) |
INDArray |
create(long[] shape,
long[] stride,
long offset,
char ordering) |
INDArray |
create(long rows,
long columns)
Creates an ndarray with the specified shape
|
INDArray |
create(long rows,
long columns,
char ordering) |
INDArray |
create(long rows,
long columns,
int[] stride)
Creates an ndarray with the specified shape
|
INDArray |
create(long rows,
long columns,
int[] stride,
long offset)
Creates an ndarray with the specified shape
|
INDArray |
create(long rows,
long columns,
long[] stride,
long offset) |
INDArray |
create(short[] data,
long[] shape,
long[] stride,
char order,
DataType dataType,
MemoryWorkspace workspace) |
INDArray |
create(short[] data,
long[] shape,
long[] stride,
DataType dataType,
MemoryWorkspace workspace) |
void |
createBlas()
Create blas
|
INDArray |
createFromNpyFile(File file)
Create from a given numpy file.
|
INDArray |
createFromNpyHeaderPointer(org.bytedeco.javacpp.Pointer pointer)
Create from an in memory numpy header.
|
INDArray |
createFromNpyPointer(org.bytedeco.javacpp.Pointer pointer)
Create from an in memory numpy pointer
|
Map<String,INDArray> |
createFromNpzFile(File file)
Create a Map
|
void |
createLapack()
Create lapack
|
void |
createLevel1()
Create level 1
|
void |
createLevel2()
Create level 2
|
void |
createLevel3()
Create level 3
|
INDArray |
createUninitialized(DataType dataType,
long[] shape,
char ordering,
MemoryWorkspace workspace) |
INDArray |
createUninitialized(int[] shape,
char ordering) |
INDArray |
createUninitialized(long[] shape,
char ordering) |
INDArray |
createUninitializedDetached(DataType dataType,
char ordering,
long... shape)
Create an uninitialized ndArray.
|
DataType |
dtype()
Returns the data opType for this ndarray
|
INDArray |
empty(DataType type) |
INDArray |
eye(long n)
Create the identity ndarray
|
INDArray |
hstack(INDArray... arrs)
Concatenates two matrices horizontally.
|
Lapack |
lapack() |
Level1 |
level1()
Return the level 1 blas operations
|
Level2 |
level2()
Return the level 2 blas operations
|
Level3 |
level3()
Return the level 3 blas operations
|
INDArray |
ones(int[] shape)
Create an ndarray of ones
|
INDArray |
ones(long columns)
Creates a row vector with the specified number of columns
|
INDArray |
ones(long[] shape) |
INDArray |
ones(long rows,
long columns)
Creates a row vector with the specified number of columns
|
char |
order()
Returns the order for this ndarray for internal data storage
|
INDArray |
pullRows(INDArray source,
INDArray destination,
int sourceDimension,
int[] indexes)
* This method produces concatenated array, that consist from tensors,
fetched from source array, against some dimension and specified indexes
in to the destination array
|
INDArray |
pullRows(INDArray source,
int sourceDimension,
int[] indexes)
This method produces concatenated array, that consist from tensors, fetched from source array, against some dimension and specified indexes
|
INDArray |
pullRows(INDArray source,
int sourceDimension,
int[] indexes,
char order)
This method produces concatenated array, that consist from tensors,
fetched from source array, against some dimension and specified indexes
|
INDArray |
pullRows(INDArray source,
int sourceDimension,
long[] indexes) |
INDArray |
rand(char order,
int[] shape)
Create a random ndarray with the given shape, and specified output order
|
INDArray |
rand(char order,
long[] shape)
Create a random ndarray with the given shape
and specified output order
|
INDArray |
rand(char order,
long rows,
long columns)
Create a random (uniform 0-1) NDArray with the specified shape and order
|
INDArray |
rand(int[] shape)
Create a random ndarray with the given shape using
the current time as the seed
|
INDArray |
rand(int[] shape,
Distribution r)
Create a random ndarray with the given shape using the given rng
|
INDArray |
rand(int[] shape,
double min,
double max,
Random rng) |
INDArray |
rand(int[] shape,
float min,
float max,
Random rng)
Generates a random matrix between min and max
|
INDArray |
rand(int[] shape,
long seed)
Create a random ndarray with the given shape using the given rng
|
INDArray |
rand(int[] shape,
Random r)
Create a random ndarray with the given shape using the given rng
|
INDArray |
rand(long[] shape)
Create a random ndarray with the given shape using
the current time as the seed
|
INDArray |
rand(long[] shape,
double min,
double max,
Random rng) |
INDArray |
rand(long[] shape,
float min,
float max,
Random rng) |
INDArray |
rand(long[] shape,
long seed) |
INDArray |
rand(long[] shape,
Random r) |
INDArray |
rand(long rows,
long columns)
Create a random ndarray with the given shape using
the current time as the seed
|
INDArray |
rand(long rows,
long columns,
double min,
double max,
Random rng) |
INDArray |
rand(long rows,
long columns,
float min,
float max,
Random rng)
Generates a random matrix between min and max
|
INDArray |
rand(long rows,
long columns,
long seed)
Create a random ndarray with the given shape using the given rng
|
INDArray |
rand(long rows,
long columns,
Random r)
Create a random ndarray with the given shape using the given rng
|
INDArray |
randn(char order,
int[] shape)
Random normal N(0,1) with the specified shape and order
|
INDArray |
randn(char order,
long[] shape)
Random normal N(0,1) with the specified shape and order
|
INDArray |
randn(char order,
long rows,
long columns)
Random normal N(0,1), with specified output order
|
INDArray |
randn(int[] shape)
Random normal N(0,1) using the current time stamp
as the seed
|
INDArray |
randn(int[] shape,
long seed)
Random normal using the specified seed
|
INDArray |
randn(int[] shape,
Random r)
Random normal using the given rng
|
INDArray |
randn(long[] shape)
Random normal N(0,1) using the current time stamp
as the seed
|
INDArray |
randn(long[] shape,
long seed)
Random normal using the specified seed
|
INDArray |
randn(long[] shape,
Random r) |
INDArray |
randn(long rows,
long columns)
Random normal (N(0,1)) using the current time stamp
as the seed
|
INDArray |
randn(long rows,
long columns,
long seed)
Random normal using the specified seed
|
INDArray |
randn(long rows,
long columns,
Random r)
Random normal using the given rng
|
INDArray |
reverse(INDArray reverse)
Reverses the passed in matrix such that m[0] becomes m[m.length - 1] etc
|
INDArray |
rot(INDArray reverse)
Reverses the passed in matrix such that m[0] becomes m[m.length - 1] etc
|
void |
rot90(INDArray toRotate)
Rotate a matrix 90 degrees
|
INDArray |
scalar(double value)
Create a scalar nd array with the specified value and offset
|
INDArray |
scalar(double value,
long offset)
Create a scalar nd array with the specified value and offset
|
INDArray |
scalar(float value)
Create a scalar nd array with the specified value and offset
|
INDArray |
scalar(float value,
long offset)
Create a scalar nd array with the specified value and offset
|
INDArray |
scalar(int value,
long offset) |
INDArray |
scalar(Number value)
Create a scalar ndarray with the specified offset
|
void |
setDType(DataType dtype)
Sets the data opType
|
void |
setOrder(char order)
Sets the order.
|
void |
shuffle(Collection<INDArray> array,
Random rnd,
int... dimension)
Symmetric in place shuffle of an ndarray
along a specified set of dimensions.
|
void |
shuffle(INDArray array,
Random rnd,
int... dimension)
In place shuffle of an ndarray
along a specified set of dimensions
|
void |
shuffle(List<INDArray> array,
Random rnd,
List<int[]> dimensions)
Symmetric in place shuffle of an ndarray
along a specified set of dimensions.
|
INDArray |
sort(INDArray x,
boolean descending) |
INDArray |
sort(INDArray x,
boolean descending,
int... dimensions) |
INDArray |
sortCooIndices(INDArray x) |
INDArray |
specialConcat(int dimension,
INDArray... toConcat)
Concatenate ndarrays along a dimension
PLEASE NOTE: This method is special for GPU backend, it works on HOST side only.
|
INDArray[] |
tear(INDArray tensor,
int... dimensions) |
INDArray |
toFlattened(char order,
Collection<INDArray> matrices)
Returns a flattened ndarray with all elements in each ndarray
regardless of dimension.
|
INDArray |
toFlattened(char order,
INDArray... matrices)
Flatten all of the ndarrays in to one long vector
|
INDArray |
toFlattened(Collection<INDArray> matrices)
/**
Returns a flattened ndarray with all of the elements in each ndarray
regardless of dimension
|
INDArray |
toFlattened(INDArray... matrices)
Flatten all of the ndarrays in to one long vector
|
INDArray |
toFlattened(int length,
Iterator<? extends INDArray>... matrices)
Returns a flattened ndarray with all of the elements in each ndarray
regardless of dimension
|
INDArray |
valueArrayOf(int[] shape,
double value)
Creates an ndarray with the specified value
as the only value in the ndarray
|
INDArray |
valueArrayOf(long[] shape,
double value) |
INDArray |
valueArrayOf(long rows,
long columns,
double value)
Creates a row vector with the specified number of columns
|
INDArray |
vstack(INDArray... arrs)
Concatenates two matrices vertically.
|
INDArray |
zeros(int[] shape)
Create an ndarray of zeros
|
INDArray |
zeros(long columns)
Creates a row vector with the specified number of columns
|
INDArray |
zeros(long[] shape) |
INDArray |
zeros(long rows,
long columns)
Creates a row vector with the specified number of columns
|
static final char FORTRAN
static final char C
Blas blas()
Lapack lapack()
Level1 level1()
Level2 level2()
Level3 level3()
void createBlas()
void createLevel1()
void createLevel2()
void createLevel3()
void createLapack()
void setOrder(char order)
order - void setDType(DataType dtype)
dtype - INDArray create(int[] shape, DataBuffer buffer)
shape - the shape to usebuffer - the buffer to usechar order()
DataType dtype()
INDArray toFlattened(Collection<INDArray> matrices)
matrices - the ndarrays to useINDArray toFlattened(int length, Iterator<? extends INDArray>... matrices)
matrices - the ndarrays to useINDArray toFlattened(char order, Collection<INDArray> matrices)
matrices - the ndarrays to flattenorder - the order in which the ndarray values should be flattenedINDArray bilinearProducts(INDArray curr, INDArray in)
INDArray toFlattened(INDArray... matrices)
matrices - the matrices to flattenINDArray toFlattened(char order, INDArray... matrices)
matrices - the matrices to flattenINDArray eye(long n)
n - the number for the identityvoid rot90(INDArray toRotate)
toRotate - the matrix to rotateINDArray rot(INDArray reverse)
reverse - the matrix to reverseINDArray reverse(INDArray reverse)
reverse - the matrix to reverseINDArray arange(double begin, double end, double step)
begin - the begin of the rangeend - the end of the rangevoid copy(INDArray a, INDArray b)
a - the origin matrixb - the destination matrixINDArray rand(int[] shape, float min, float max, Random rng)
shape - the number of rows of the matrixmin - the minimum numbermax - the maximum numberrng - the rng to useINDArray rand(long rows, long columns, float min, float max, Random 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 useINDArray create(double[][] data)
data - the data to create the ndarray withINDArray create(double[][] data, char ordering)
data - ordering - INDArray concat(int dimension, INDArray... toConcat)
dimension - the dimension to concatneate alongtoConcat - the ndarrays to concateneateINDArray specialConcat(int dimension, INDArray... toConcat)
dimension - the dimension to concatneate alongtoConcat - the ndarrays to concateneateINDArray pullRows(INDArray source, int sourceDimension, int[] indexes)
source - source tensorsourceDimension - dimension of source tensorindexes - indexes from source arrayINDArray pullRows(INDArray source, int sourceDimension, int[] indexes, char order)
source - source tensorsourceDimension - dimension of source tensorindexes - indexes from source arrayorder - order for result arrayINDArray pullRows(INDArray source, INDArray destination, int sourceDimension, int[] indexes)
source - destination - sourceDimension - indexes - void shuffle(INDArray array, Random rnd, int... dimension)
array - the ndarray to shuffledimension - the dimension to do the shufflevoid shuffle(Collection<INDArray> array, Random rnd, int... dimension)
array - the ndarray to shuffledimension - the dimension to do the shufflevoid shuffle(List<INDArray> array, Random rnd, List<int[]> dimensions)
array - the ndarray to shuffledimensions - the dimensions to do the shuffleINDArray average(INDArray target, INDArray[] arrays)
arrays - INDArray average(INDArray[] arrays)
arrays - INDArray average(Collection<INDArray> arrays)
arrays - INDArray accumulate(INDArray target, INDArray... arrays)
target - arrays - INDArray average(INDArray target, Collection<INDArray> arrays)
arrays - INDArray rand(long rows, long columns, Random r)
rows - the number of rows in the matrixcolumns - the number of columns in the matrixr - the random generator to useINDArray rand(long rows, long columns, long seed)
rows - the number of rows in the matrixcolumns - the columns of the ndarrayseed - the seed to useINDArray rand(long rows, long columns)
rows - the number of rows in the matrixcolumns - the number of columns in the matrixINDArray rand(char order, long rows, long columns)
order - Order ('c' or 'f') of the output arrayrows - Number of rows of the output arraycolumns - Number of columns of the output arrayINDArray randn(long rows, long columns, Random r)
rows - the number of rows in the matrixcolumns - the number of columns in the matrixr - the random generator to useINDArray randn(long rows, long columns)
rows - the number of rows in the matrixcolumns - the number of columns in the matrixINDArray randn(char order, long rows, long columns)
rows - the number of rows in the matrixcolumns - the number of columns in the matrixINDArray randn(long rows, long columns, long seed)
rows - the number of rows in the matrixcolumns - the number of columns in the matrixINDArray rand(int[] shape, Distribution r)
shape - the shape of the ndarrayr - the random generator to useINDArray rand(int[] shape, Random r)
shape - the shape of the ndarrayr - the random generator to useINDArray rand(int[] shape, long seed)
shape - the shape of the ndarrayseed - the seed to useINDArray rand(long[] shape, long seed)
INDArray rand(int[] shape)
shape - the shape of the ndarrayINDArray rand(long[] shape)
shape - the shape of the ndarrayINDArray rand(char order, int[] shape)
shape - the shape of the ndarrayINDArray rand(char order, long[] shape)
order - the order of the arrayshape - the shape of the arrayINDArray randn(int[] shape, Random r)
shape - the shape of the ndarrayr - the random generator to useINDArray randn(int[] shape)
shape - the shape of the ndarrayINDArray randn(long[] shape)
shape - the shape of the ndarrayINDArray randn(char order, int[] shape)
order - the order ('c' or 'f') of the output arrayshape - the shape of the ndarrayINDArray randn(char order, long[] shape)
order - the order ('c' or 'f') of the output arrayshape - the shape of the ndarrayINDArray randn(int[] shape, long seed)
shape - the shape of the ndarrayINDArray randn(long[] shape, long seed)
shape - the shape of the ndarrayINDArray create(double[] data)
data - the columns of the ndarrayINDArray create(float[] data)
data - the columns of the ndarrayINDArray create(DataBuffer data)
data - the columns of the ndarrayINDArray create(long columns)
columns - the columns of the ndarrayINDArray zeros(long rows, long columns)
rows - the rows of the ndarraycolumns - the columns of the ndarrayINDArray zeros(long columns)
columns - the columns of the ndarrayINDArray valueArrayOf(int[] shape, double value)
shape - the shape of the ndarrayvalue - the value to assignINDArray valueArrayOf(long[] shape, double value)
INDArray valueArrayOf(long rows, long columns, double value)
rows - the number of rows in the matrixcolumns - the columns of the ndarrayvalue - the value to assignINDArray ones(long rows, long columns)
rows - the number of rows in the matrixcolumns - the columns of the ndarrayINDArray ones(long columns)
columns - the columns of the ndarrayINDArray hstack(INDArray... arrs)
arrs - INDArray vstack(INDArray... arrs)
arrs - INDArray zeros(int[] shape)
shape - the shape of the ndarrayINDArray zeros(long[] shape)
INDArray ones(int[] shape)
shape - the shape of the ndarrayINDArray ones(long[] shape)
INDArray create(DataBuffer data, long rows, long columns, int[] stride, long 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 ndarrayINDArray create(float[] data, long rows, long columns, int[] stride, long offset)
data - rows - columns - stride - offset - INDArray create(float[] data, int[] shape, int[] stride, long offset)
shape - the shape of the ndarraystride - the stride for the ndarrayoffset - the offset of the ndarrayINDArray create(float[] data, long[] shape, long[] stride, long offset)
INDArray create(double[] data, int[] shape)
data - the data to use with tne ndarrayshape - the shape of the ndarrayINDArray create(double[] data, long[] shape)
INDArray create(float[] data, long[] shape)
INDArray create(float[] data, int[] shape)
data - the data to use with tne ndarrayshape - the shape of the ndarrayINDArray create(double[] data, long rows, long columns, int[] stride, long 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 ndarrayINDArray create(double[] data, int[] shape, int[] stride, long offset)
shape - the shape of the ndarraystride - the stride for the ndarrayoffset - the offset of the ndarrayINDArray create(double[] data, long[] shape, long[] stride, long offset)
INDArray create(double[] data, long[] shape, long[] stride, DataType dataType, MemoryWorkspace workspace)
INDArray create(float[] data, long[] shape, long[] stride, DataType dataType, MemoryWorkspace workspace)
INDArray create(long[] data, long[] shape, long[] stride, DataType dataType, MemoryWorkspace workspace)
INDArray create(int[] data, long[] shape, long[] stride, DataType dataType, MemoryWorkspace workspace)
INDArray create(short[] data, long[] shape, long[] stride, DataType dataType, MemoryWorkspace workspace)
INDArray create(byte[] data, long[] shape, long[] stride, DataType dataType, MemoryWorkspace workspace)
INDArray create(boolean[] data, long[] shape, long[] stride, DataType dataType, MemoryWorkspace workspace)
INDArray create(double[] data, long[] shape, long[] stride, char order, DataType dataType, MemoryWorkspace workspace)
INDArray create(float[] data, long[] shape, long[] stride, char order, DataType dataType, MemoryWorkspace workspace)
INDArray create(long[] data, long[] shape, long[] stride, char order, DataType dataType, MemoryWorkspace workspace)
INDArray create(int[] data, long[] shape, long[] stride, char order, DataType dataType, MemoryWorkspace workspace)
INDArray create(short[] data, long[] shape, long[] stride, char order, DataType dataType, MemoryWorkspace workspace)
INDArray create(byte[] data, long[] shape, long[] stride, char order, DataType dataType, MemoryWorkspace workspace)
INDArray create(boolean[] data, long[] shape, long[] stride, char order, DataType dataType, MemoryWorkspace workspace)
INDArray create(DataBuffer data, int[] shape)
data - the data to use with tne ndarrayshape - the shape of the ndarrayINDArray create(DataBuffer data, long[] shape)
INDArray create(DataBuffer data, int[] shape, int[] stride, long offset)
shape - the shape of the ndarraystride - the stride for the ndarrayoffset - the offset of the ndarrayINDArray create(DataBuffer data, long[] shape, long[] stride, long offset)
INDArray create(List<INDArray> list, int[] shape)
shape - the shape of the ndarrayINDArray create(long rows, long columns, int[] stride, long offset)
rows - the rows of the ndarraycolumns - the columns of the ndarraystride - the stride for the ndarrayoffset - the offset of the ndarrayINDArray create(long rows, long columns, long[] stride, long offset)
INDArray create(int[] shape, int[] stride, long offset)
shape - the shape of the ndarraystride - the stride for the ndarrayoffset - the offset of the ndarrayINDArray create(long[] shape, long[] stride, long offset)
INDArray create(long rows, long columns, int[] stride)
rows - the rows of the ndarraycolumns - the columns of the ndarraystride - the stride for the ndarrayINDArray create(int[] shape, int[] stride)
shape - the shape of the ndarraystride - the stride for the ndarrayINDArray create(long[] shape, long[] stride)
INDArray create(long[] shape)
INDArray create(long rows, long columns)
rows - the rows of the ndarraycolumns - the columns of the ndarrayINDArray create(int[] shape)
shape - the shape of the ndarrayINDArray scalar(float value, long offset)
value - the value of the scalaroffset - the offset of the ndarrayINDArray scalar(double value, long offset)
value - the value of the scalaroffset - the offset of the ndarrayINDArray scalar(int value, long offset)
INDArray scalar(Number value)
value - the value to initialize the scalar withINDArray scalar(float value)
value - the value of the scalar
= * @return the scalar nd arrayINDArray scalar(double value)
value - the value of the scalar
= * @return the scalar nd arrayINDArray create(float[] data, int[] shape, long offset)
data - shape - offset - INDArray create(float[] data, int[] shape, char ordering)
data - shape - ordering - INDArray create(float[][] floats)
floats - INDArray create(float[][] data, char ordering)
INDArray create(float[] data, int[] shape, int[] stride, long offset, char ordering)
data - shape - stride - offset - ordering - INDArray create(DataBuffer buffer, int[] shape, long offset)
buffer - shape - offset - INDArray create(int[] shape, char ordering)
shape - ordering - INDArray create(long[] shape, char ordering)
INDArray create(DataType dataType, long[] shape, char ordering, MemoryWorkspace workspace)
INDArray create(DataType dataType, long[] shape, long[] strides, char ordering, MemoryWorkspace workspace)
INDArray create(DataType dataType, long[] shape, long[] paddings, long[] paddingOffsets, char ordering, MemoryWorkspace workspace)
dataType - shape - paddings - paddingOffsets - ordering - Fortran 'f' or C/C++ 'c' ordering.workspace - INDArray createUninitialized(int[] shape, char ordering)
INDArray createUninitialized(long[] shape, char ordering)
INDArray createUninitialized(DataType dataType, long[] shape, char ordering, MemoryWorkspace workspace)
INDArray createUninitializedDetached(DataType dataType, char ordering, long... shape)
dataType - data type. Exceptions will be thrown for UTF8, COMPRESSED and UNKNOWN data types.ordering - Fortran 'f' or C/C++ 'c' ordering.shape - the shape of the array.INDArray create(DataBuffer data, int[] newShape, int[] newStride, long offset, char ordering)
data - newShape - newStride - offset - ordering - INDArray create(DataBuffer data, long[] newShape, long[] newStride, long offset, char ordering)
INDArray create(DataBuffer data, long[] newShape, long[] newStride, long offset, long ews, char ordering)
INDArray create(DataBuffer data, long[] newShape, long[] newStride, long offset, char ordering, DataType dataType)
INDArray rand(long rows, long columns, double min, double max, Random rng)
rows - columns - min - max - rng - INDArray create(float[] data, int[] shape, long offset, Character order)
data - shape - offset - order - INDArray create(float[] data, long rows, long columns, int[] stride, long offset, char ordering)
data - rows - columns - stride - offset - ordering - INDArray create(double[] data, int[] shape, char ordering)
data - shape - ordering - INDArray create(List<INDArray> list, int[] shape, char ordering)
list - shape - ordering - INDArray create(double[] data, int[] shape, long offset)
data - shape - offset - INDArray create(double[] data, int[] shape, int[] stride, long offset, char ordering)
data - shape - stride - offset - ordering - INDArray rand(int[] shape, double min, double max, Random rng)
shape - min - max - rng - INDArray create(int[] ints, int[] ints1, int[] stride, long offset)
ints - ints1 - stride - offset - INDArray create(int[] shape, int[] ints1, int[] stride, char order, long offset)
shape - ints1 - stride - order - offset - INDArray create(long rows, long columns, char ordering)
rows - columns - ordering - INDArray create(int[] shape, DataType dataType, MemoryWorkspace workspace)
shape - dataType - INDArray create(float[] data, char order)
data - order - INDArray create(float[] data, int[] shape, int[] stride, char order, long offset)
data - shape - stride - order - offset - INDArray create(float[] data, long[] shape, long[] stride, char order, long offset)
INDArray create(DataBuffer buffer, int[] shape, int[] stride, char order, long offset)
buffer - shape - stride - order - offset - INDArray create(double[] data, char order)
data - order - INDArray create(double[] data, int[] shape, int[] stride, char order, long offset)
data - shape - stride - order - offset - INDArray create(int[] shape, int[] stride, long offset, char ordering)
shape - stride - offset - ordering - INDArray create(long[] shape, long[] stride, long offset, char ordering)
INDArray convertDataEx(DataTypeEx typeSrc, INDArray source, DataTypeEx typeDst)
typeSrc - source - typeDst - DataBuffer convertDataEx(DataTypeEx typeSrc, DataBuffer source, DataTypeEx typeDst)
typeSrc - source - typeDst - void convertDataEx(DataTypeEx typeSrc, DataBuffer source, DataTypeEx typeDst, DataBuffer target)
typeSrc - source - typeDst - target - void convertDataEx(DataTypeEx typeSrc, org.bytedeco.javacpp.Pointer source, DataTypeEx typeDst, org.bytedeco.javacpp.Pointer target, long length)
typeSrc - source - typeDst - target - length - void convertDataEx(DataTypeEx typeSrc, org.bytedeco.javacpp.Pointer source, DataTypeEx typeDst, DataBuffer buffer)
typeSrc - source - typeDst - buffer - INDArray createFromNpyPointer(org.bytedeco.javacpp.Pointer pointer)
pointer - the pointer to the
numpy arrayINDArray createFromNpyHeaderPointer(org.bytedeco.javacpp.Pointer pointer)
pointer - the pointer to the
numpy headerINDArray createFromNpyFile(File file)
file - the file to create the ndarray fromMap<String,INDArray> createFromNpzFile(File file) throws Exception
file - the file to create the map fromExceptionorg.bytedeco.javacpp.Pointer convertToNumpy(INDArray array)
INDArray
to a numpy array.
This will usually be used
for writing out to an external source.
Note that this will create a zero copy reference
to this ndarray's underlying data.array - the array to convertINDArray create(float[] data, long[] shape, long[] stride, long offset, char ordering)
INDArray create(double[] data, long[] shape, long[] stride, long offset, char ordering)
INDArray create(float[] data, long[] shape, char ordering)
INDArray create(double[] data, long[] shape, char ordering)
INDArray create(Collection<String> strings, long[] shape, char order)
Copyright © 2021. All rights reserved.