public abstract class BaseSparseNDArray extends Object implements ISparseNDArray
| Modifier and Type | Field and Description |
|---|---|
protected long |
columns |
protected Boolean |
isMatrix |
protected Boolean |
isScalar |
static boolean |
isSparse |
protected Boolean |
isVector |
protected long[] |
javaShapeInformation |
protected long |
length |
protected int |
rank |
protected long |
rows |
protected DataBuffer |
shape |
protected DataBuffer |
shapeInformation |
protected DataBuffer |
sparseInformation |
protected DataBuffer |
stride |
protected static double |
THRESHOLD_MEMORY_ALLOCATION |
| Constructor and Description |
|---|
BaseSparseNDArray() |
| Modifier and Type | Method and Description |
|---|---|
INDArray |
add(INDArray other)
Element-wise copy addition of two NDArrays
|
INDArray |
add(INDArray other,
INDArray result)
Element-wise copy addition of two NDArrays
|
INDArray |
add(Number n)
Scalar addition (cloning)
|
INDArray |
add(Number n,
INDArray result)
Addition of this ndarray.
|
INDArray |
addColumnVector(INDArray columnVector)
Addition of a column vector (copy)
|
INDArray |
addi(INDArray other)
in place (element wise) addition of two NDArrays
|
INDArray |
addi(INDArray other,
INDArray result)
in place (element wise) addition of two NDArrays
|
INDArray |
addi(Number n)
In place scalar addition
|
INDArray |
addi(Number n,
INDArray result)
In place addition
|
INDArray |
addiColumnVector(INDArray columnVector)
In place addition of a column vector
|
INDArray |
addiRowVector(INDArray rowVector)
In place addition of a row vector
|
INDArray |
addRowVector(INDArray rowVector)
Addition of a row vector (copy)
|
boolean |
all()
This method checks if all elements within this array are non-zero (or true, in case of boolean)
|
INDArray |
amax(int... dimension)
Returns the absolute overall max of this ndarray along given dimensions
|
Number |
amaxNumber()
Returns maximum (absolute) value in this INDArray
|
INDArray |
amean(int... dimension)
Returns the absolute overall mean of this ndarray
|
Number |
ameanNumber()
Returns the absolute overall mean of this ndarray
|
INDArray |
amin(int... dimension)
Returns minimum (absolute) value in this INDArray, along the specified dimensions
|
Number |
aminNumber()
Returns absolute min value in this INDArray
|
boolean |
any()
This method checks if any of the elements within this array are non-zero (or true, in case of boolean)
|
INDArray |
argMax(int... dimension)
This method returns index of highest value along specified dimension(s)
|
INDArray |
assign(INDArray arr)
Assign all of the elements in the given ndarray to this ndarray
|
INDArray |
assign(Number value)
Set all entries of the ndarray to the specified value
|
INDArray |
assignIf(INDArray arr,
Condition condition)
Assign all elements from given ndarray that are matching given condition,
ndarray to this ndarray
|
INDArray |
broadcast(INDArray result)
Broadcasts this ndarray to be the specified shape
|
INDArray |
broadcast(long... shape)
Broadcasts this ndarray to be the specified shape
|
protected Object |
clone() |
int |
columns()
Returns the number of columns in this matrix (throws exception if not 2d)
|
INDArray |
cond(Condition condition)
Returns a binary INDArray with value 'true' if the element matches the specified condition and 'false' otherwise
|
INDArray |
cumsum(int dimension)
Returns the cumulative sum along a dimension.
|
INDArray |
cumsumi(int dimension)
Returns the cumulative sum along a dimension.
|
DataType |
dataType()
This method returns dtype for this INDArray
|
INDArray |
detach()
This method detaches INDArray from Workspace, returning copy.
|
INDArray |
dimShuffle(Object[] rearrange,
int[] newOrder,
boolean[] broadCastable)
Dimshuffle: an extension of permute that adds the ability
to broadcast various dimensions.
|
INDArray |
dimShuffle(Object[] rearrange,
long[] newOrder,
boolean[] broadCastable) |
double |
distance1(INDArray other)
Returns the (1-norm) distance.
|
double |
distance2(INDArray other)
Returns the (euclidean) distance.
|
INDArray |
div(INDArray other)
Copy (element wise) division of two NDArrays
|
INDArray |
div(INDArray other,
INDArray result)
copy (element wise) division of two NDArrays
|
INDArray |
div(Number n)
Division by a number
|
INDArray |
div(Number n,
INDArray result)
Division if ndarray by number
|
INDArray |
divColumnVector(INDArray columnVector)
Division of a column vector (copy)
|
INDArray |
divi(INDArray other)
in place (element wise) division of two NDArrays
|
INDArray |
divi(INDArray other,
INDArray result)
in place (element wise) division of two NDArrays
|
INDArray |
divi(Number n)
In place scalar division
|
INDArray |
divi(Number n,
INDArray result)
In place division of this ndarray
|
INDArray |
diviColumnVector(INDArray columnVector)
In place division of a column vector
|
INDArray |
diviRowVector(INDArray rowVector)
In place division of a row vector
|
INDArray |
divRowVector(INDArray rowVector)
Division of a row vector (copy)
|
INDArray |
dup()
Returns a copy of this ndarray
|
INDArray |
dup(char order)
Returns a copy of this ndarray, where the returned ndarray has the specified order
|
Object |
element()
Returns a scalar (individual element)
of a scalar ndarray
|
int |
elementWiseStride()
Element wise stride
|
INDArray |
entropy(int... dimension)
Returns entropy value for this INDArray along specified dimension(s)
|
Number |
entropyNumber()
Returns entropy value for this INDArray
|
INDArray |
eps(INDArray other)
Returns the binary ndarray for "Epsilon equals" comparison.
|
INDArray |
eps(Number other)
Returns the binary ndarray for "Epsilon equals" comparison.
|
INDArray |
eq(INDArray other)
Returns the binary ndarray for "Equals" comparison.
|
INDArray |
eq(Number other)
Returns the binary ndarray for "Equals" comparison.
|
boolean |
equals(Object o) |
boolean |
equalShapes(INDArray other)
This method checks 2 INDArrays for equal shapes.
Shapes are considered equal if: (a) Both arrays have equal rank, and (b) size(0)...size(rank()-1) are equal for both arrays |
boolean |
equalsWithEps(Object o,
double eps)
This method checks 2 INDArrays equality with given eps
|
int[] |
flags() |
INDArray |
fmod(INDArray denominator)
remainder of division
|
INDArray |
fmod(INDArray denominator,
INDArray result)
remainder of division
|
INDArray |
fmod(Number denominator) |
INDArray |
fmod(Number denominator,
INDArray result) |
INDArray |
fmodi(INDArray denominator)
In place fmod
|
INDArray |
fmodi(Number denominator)
In place fmod
|
INDArray |
get(INDArray indices)
Get the elements from this ndarray based on the specified indices
|
INDArray |
get(INDArrayIndex... indexes)
Returns a subset of this array based on the specified indexes
|
INDArray |
getColumn(long i)
Returns the specified column.
|
INDArray |
getColumn(long i,
boolean keepDim)
Returns the specified column.
|
INDArray |
getColumns(int... columns)
Get an INDArray comprised of the specified columns only.
|
double |
getDouble(int... indices)
Get a double value at the specified indices.
|
double |
getDouble(long... indices) |
double |
getDouble(long i)
Get the double value at the specified linear index in the array
|
double |
getDouble(long i,
long j)
Get the double value at the specified indices.
|
double |
getDoubleUnsafe(long offset)
Get a double at the given linear offset unsafe, without checks.
|
float |
getFloat(int[] indices)
Returns the elements at the specified indices
|
float |
getFloat(long i)
Return the item at the linear index i
|
float |
getFloat(long[] indices) |
float |
getFloat(long i,
long j)
Return the item at row i column j
Note that this is the same as calling getScalar(new int[]{i,j}
|
int |
getInt(int... indices)
Get an integer value at the specified indices.
|
int |
getLeadingOnes()
Get the number of leading ones in the array shape.
|
long |
getLong(long... indices) |
Number |
getNumber(long... indices) |
Number |
getNumber(long index) |
protected double |
getPercentile(Number quantile,
INDArray sorted) |
INDArray |
getRow(long i)
Returns the specified row as a 1D vector.
|
INDArray |
getRow(long i,
boolean keepDim)
Returns the specified row.
|
INDArray |
getRows(int... rows)
Get an INDArray comprised of the specified rows only.
|
INDArray |
getScalar(int... indices)
Returns the elements at the specified indices
|
INDArray |
getScalar(long... indices) |
INDArray |
getScalar(long i)
Returns the element at the specified index
|
INDArray |
getScalar(long row,
long column)
Returns the element at the specified row/column
|
int |
getTrailingOnes()
Get the number of trailing ones in the array shape.
|
INDArray |
getWhere(INDArray comp,
Condition condition)
Boolean indexing:
Return the element if it fulfills the condition in
result array
|
INDArray |
getWhere(Number comp,
Condition condition)
Boolean indexing:
Return the element if it fulfills the condition in
result array
|
INDArray |
gt(INDArray other)
Returns the binary ndarray for "Greater Than" comparison.
|
INDArray |
gt(Number other)
Returns the binary ndarray for "Greater" comparison.
|
INDArray |
gte(Number other)
Returns binary ndarray for "Greter or equals" comparison.
|
int[] |
hiddenDimensions() |
protected void |
init(long[] shape) |
boolean |
isAttached()
This method returns True, if this INDArray instance is attached to some Workspace.
|
boolean |
isColumnVector()
Checks whether the matrix is a column vector.
|
boolean |
isColumnVectorOrScalar()
Returns true if the number of columns is 1
|
boolean |
isCompressed()
Check if this array is compressed.
|
INDArray |
isInfinite()
Returns the binary NDArray with value true where this array's entries are infinite, or false where they
are not infinite
|
boolean |
isInScope()
This method checks, if given attached INDArray is still in scope of its parent Workspace
PLEASE NOTE: if this INDArray isn't attached to any Workspace, this method will return true
|
boolean |
isMatrix()
Returns true if this ndarray is a matrix
|
INDArray |
isNaN()
Returns the binary NDArray with value true where this array's entries are NaN, or false where they
are not infinite
|
boolean |
isRowVector()
Checks whether the matrix is a row vector.
|
boolean |
isRowVectorOrScalar()
Returns true if the number of rows is 1
|
boolean |
isScalar()
Returns true if this ndarray is a scalar
|
boolean |
isSparse()
Check if this array is sparse
|
boolean |
isSquare()
Returns whether the matrix
has the same rows and columns
|
boolean |
isVector()
Checks whether the matrix is a vector.
|
boolean |
isVectorOrScalar()
Returns true if this ndarray is a vector or scalar
|
long |
length()
Returns the total number of elements in the ndarray
|
INDArray |
leverage()
This method detaches INDArray from current Workspace, and attaches it to Workspace above, if any.
|
INDArray |
leverageOrDetach(String id)
This method detaches INDArray from current Workspace, and attaches it to Workspace with a given Id, if a workspace
with the given ID is open and active.
|
INDArray |
leverageTo(String id)
This method detaches INDArray from current Workspace, and attaches it to Workspace with a given Id - if a workspace
with that ID exists.
|
INDArray |
leverageTo(String id,
boolean enforceExistence)
This method detaches INDArray from current Workspace, and attaches it to Workspace with a given Id.
|
INDArray |
like()
This method returns empty array with the same dtype/order/shape as this one
|
long |
linearIndex(long i)
Get the linear index of the data in to the array
|
INDArray |
logEntropy(int... dimension)
Returns log entropy along dimension
|
Number |
logEntropyNumber()
Returns log entropy value for this INDArray
|
INDArray |
lt(INDArray other)
Returns the binary ndarray for "Less" comparison.
|
INDArray |
lt(Number other)
Returns the binary ndarray for "Less" comparison.
|
INDArray |
lte(Number other)
Returns the binary ndarray for "Less or equals" comparison.
|
void |
markAsCompressed(boolean reallyCompressed)
This method marks INDArray instance as compressed
PLEASE NOTE: Do not use this method unless you 100% have to
|
INDArray |
match(INDArray comp,
Condition condition)
Return a mask on whether each element matches the given condition
|
INDArray |
match(Number comp,
Condition condition)
Returns a mask
|
INDArray |
max(boolean keepDims,
int... dimension)
Returns the overall max of this ndarray along given dimensions
|
INDArray |
max(int... dimension)
Returns the overall max of this ndarray along given dimensions
|
Number |
maxNumber()
Returns maximum value in this INDArray
|
INDArray |
mean(boolean keepDims,
int... dimension)
Returns the overall mean of this ndarray
|
INDArray |
mean(INDArray result,
boolean keepDims,
int... dimension)
Returns the overall mean of this ndarray
|
INDArray |
mean(INDArray result,
int... dimension)
Returns the overall mean of this ndarray
|
INDArray |
mean(int... dimension)
Returns the overall mean of this ndarray
|
Number |
meanNumber()
Returns the overall mean of this ndarray
|
INDArray |
median(int... dimension)
This method returns median along given dimension(s)
|
Number |
medianNumber()
This method returns median value for this INDArray
|
INDArray |
migrate()
This method pulls this INDArray into current Workspace.
|
INDArray |
migrate(boolean detachIfNoWs)
This method pulls this INDArray into current Workspace, or optionally detaches if no workspace is present.
That is: If current workspace is present/active, INDArray is migrated to it. If no current workspace is present/active, one of two things occur: 1. |
INDArray |
min(boolean keepDims,
int... dimension)
Returns the overall min of this ndarray
|
INDArray |
min(int... dimension)
Returns the overall min of this ndarray
|
Number |
minNumber()
Returns min value in this INDArray
|
INDArray |
mmul(INDArray other)
Perform a copy matrix multiplication
|
INDArray |
mmul(INDArray other,
INDArray result)
Perform an copy matrix multiplication
|
INDArray |
mmuli(INDArray other)
Perform an inplace matrix multiplication
|
INDArray |
mmuli(INDArray other,
INDArray result)
Perform an inplace matrix multiplication
|
INDArray |
mul(INDArray other)
copy (element wise) multiplication of two NDArrays
|
INDArray |
mul(INDArray other,
INDArray result)
copy (element wise) multiplication of two NDArrays
|
INDArray |
mul(Number n)
Scalar multiplication (copy)
|
INDArray |
mul(Number n,
INDArray result)
Multiplication of ndarray.
|
INDArray |
mulColumnVector(INDArray columnVector)
Multiplication of a column vector (copy)
|
INDArray |
muli(INDArray other)
in place (element wise) multiplication of two NDArrays
|
INDArray |
muli(INDArray other,
INDArray result)
in place (element wise) multiplication of two NDArrays
|
INDArray |
muli(Number n)
In place scalar multiplication
|
INDArray |
muli(Number n,
INDArray result)
In place multiplication of this ndarray
|
INDArray |
muliColumnVector(INDArray columnVector)
In place multiplication of a column vector
|
INDArray |
muliRowVector(INDArray rowVector)
In place multiplication of a row vector
|
INDArray |
mulRowVector(INDArray rowVector)
Multiplication of a row vector (copy)
|
INDArray |
neg()
Returns the ndarray negative (cloned)
|
INDArray |
negi()
In place setting of the negative version of this ndarray
|
INDArray |
neq(INDArray other)
Returns the binary ndarray for "Not equals" comparison.
|
INDArray |
neq(Number other)
Returns the binary ndarray for "Not equals" comparison.
|
int |
nnz()
Return the number of non-null element
|
boolean |
none()
This method checks if any of the elements within this array are non-zero (or true, in case of boolean)
|
INDArray |
norm1(boolean keepDims,
int... dimension)
Returns the norm1 (L1 norm, i.e., sum of absolute values; also known as Taxicab or Manhattan norm) along the
specified dimension
|
INDArray |
norm1(int... dimension)
Returns the norm1 (L1 norm, i.e., sum of absolute values; also known as Taxicab or Manhattan norm) along the
specified dimension
|
Number |
norm1Number()
Calculate and return norm1 (L1 norm, i.e., sum of absolute values; also known as Taxicab or Manhattan norm) for
the entire array
|
INDArray |
norm2(boolean keepDims,
int... dimension)
Returns the norm2 (L2 norm, sqrt(sum(x_i^2), also known as Euclidean norm) along the specified dimension(s)
|
INDArray |
norm2(int... dimension)
Returns the norm2 (L2 norm, sqrt(sum(x_i^2), also known as Euclidean norm) along the specified dimension(s)
|
Number |
norm2Number()
Return the norm2 (L2 norm, sqrt(sum(x_i^2), also known as Euclidean norm) for the entire array
|
INDArray |
normmax(boolean keepDims,
int... dimension)
Returns the max norm (aka infinity norm, equal to the maximum absolute value) along the specified dimension(s)
|
INDArray |
normmax(int... dimension)
Returns the max norm (aka infinity norm, equal to the maximum absolute value) along the specified dimension(s)
|
Number |
normmaxNumber()
Return the max norm (aka infinity norm, equal to the maximum absolute value) for the entire array
|
long |
offset()
Returns the start of where the ndarray is
for the underlying data
|
char |
ordering()
Return the ordering (fortran or c 'f' and 'c' respectively) of this ndarray
|
long |
originalOffset()
Returns the start of where the ndarray is for the original data buffer
|
INDArray |
percentile(Number quantile,
int... dimension)
This method returns median along given dimension(s)
|
Number |
percentileNumber(Number quantile)
This method returns percentile value for this INDArray
|
INDArray |
permute(int... rearrange)
See: http://www.mathworks.com/help/matlab/ref/permute.html
|
INDArray |
permutei(int... rearrange)
An in-place version of permute.
|
INDArray |
prod(boolean keepDims,
int... dimension)
Returns the product along a given dimension
|
INDArray |
prod(int... dimension)
Returns the product along a given dimension
|
Number |
prodNumber()
Calculate the product of all values in the array
|
INDArray |
put(INDArray indices,
INDArray element)
Put element in to the indices denoted by
the indices ndarray.
|
INDArray |
put(INDArrayIndex[] indices,
INDArray element)
Put the elements of the ndarray in to the specified indices
|
INDArray |
put(INDArrayIndex[] indices,
Number element)
Put the elements of the ndarray in to the specified indices
|
INDArray |
put(int[] indices,
INDArray element)
Inserts the element at the specified index
|
INDArray |
put(int i,
INDArray element)
Inserts the element at the specified index
|
INDArray |
put(int i,
int j,
INDArray element)
Inserts the element at the specified index
|
INDArray |
put(int i,
int j,
Number element)
Inserts the element at the specified index
|
INDArray |
putColumn(int column,
INDArray toPut)
Insert a column in to this array
Will throw an exception if this ndarray is not a matrix
|
INDArray |
putRow(long row,
INDArray toPut)
Insert a row in to this array
Will throw an exception if this ndarray is not a matrix
|
INDArray |
putScalar(int[] i,
double value)
Insert the item at the specified indices
|
INDArray |
putScalar(int[] indexes,
float value)
Put the specified float value at the specified indices in this array
|
INDArray |
putScalar(int[] indexes,
int value)
Put the specified integer value at the specified indices in this array
|
INDArray |
putScalar(long[] i,
double value)
|
INDArray |
putScalar(long[] i,
float value)
|
INDArray |
putScalar(long[] i,
int value)
|
INDArray |
putScalar(long i,
double value)
Insert the number linearly in to the ndarray
|
INDArray |
putScalar(long i,
float value)
Insert a scalar float at the specified index
|
INDArray |
putScalar(long i,
int value)
Insert a scalar int at the specified index
|
INDArray |
putScalar(long row,
long col,
double value)
Insert the value at the specified indices, in a 2d (rank 2) NDArray
Equivalent to INDArray.putScalar(int[], double) but avoids int[] creation |
INDArray |
putScalar(long dim0,
long dim1,
long dim2,
double value)
Insert the value at the specified indices, in a 3d (rank 3) NDArray
Equivalent to INDArray.putScalar(int[], double) but avoids int[] creation |
INDArray |
putScalar(long dim0,
long dim1,
long dim2,
long dim3,
double value)
Insert the value at the specified indices, in a 4d (rank 4) NDArray
Equivalent to INDArray.putScalar(int[], double) but avoids int[] creation |
INDArray |
putScalarUnsafe(long offset,
double value)
Insert a scalar at the given linear offset
|
INDArray |
putSlice(int slice,
INDArray put)
Assigns the given matrix (put) to the specified slice
|
INDArray |
putWhere(INDArray comp,
INDArray put,
Condition condition)
Assign the element according to the comparison array
|
INDArray |
putWhere(Number comp,
INDArray put,
Condition condition)
Assign the element according to the comparison array
|
INDArray |
putWhere(Number comp,
Number put,
Condition condition)
Assign the element according to the comparison array
|
INDArray |
putWhereWithMask(INDArray mask,
INDArray put)
Use a pre computed mask for assigning arrays
|
INDArray |
putWhereWithMask(INDArray mask,
Number put)
Use a pre computed mask for assigning arrays
|
int |
rank()
Returns the rank of the ndarray (the number of dimensions).
|
INDArray |
ravel()
Returns a flattened version (row vector) of this ndarray
|
INDArray |
ravel(char order)
Returns a flattened version (row vector) of this ndarray
|
INDArray |
rdiv(INDArray other)
Reverse division, elements wise.
|
INDArray |
rdiv(INDArray other,
INDArray result)
Reverse division
|
INDArray |
rdiv(Number n)
Reverse division with a scalar - i.e., (n / thisArrayValues)
|
INDArray |
rdiv(Number n,
INDArray result)
Reverse division (number / ndarray)
|
INDArray |
rdivColumnVector(INDArray columnVector)
Reverse division of a column vector (copy)
|
INDArray |
rdivi(INDArray other)
Reverse divsion (in place).
|
INDArray |
rdivi(INDArray other,
INDArray result)
Reverse division (in-place)
|
INDArray |
rdivi(Number n)
In place reverse division - i.e., (n / thisArrayValues)
|
INDArray |
rdivi(Number n,
INDArray result)
Reverse in place division
|
INDArray |
rdiviColumnVector(INDArray columnVector)
In place reverse divison of a column vector
|
INDArray |
rdiviRowVector(INDArray rowVector)
In place reverse division of a column vector
|
INDArray |
rdivRowVector(INDArray rowVector)
Reverse division of a column vector (copy)
|
protected DataBuffer |
reallocate(DataBuffer buffer) |
INDArray |
remainder(INDArray denominator)
Remainder operator
|
INDArray |
remainder(INDArray denominator,
INDArray result)
Remainder operator
|
INDArray |
remainder(Number denominator)
The scalar denominator
|
INDArray |
remainder(Number denominator,
INDArray result) |
INDArray |
remainderi(INDArray denominator)
In place remainder
|
INDArray |
remainderi(Number denominator)
In place remainder
|
INDArray |
replaceWhere(INDArray arr,
Condition condition)
Replaces all elements in this ndarray that are matching give condition, with corresponding elements from given array
|
INDArray |
repmat(int... shape)
Replicate and tile array to fill out to the given shape
See:
https://github.com/numpy/numpy/blob/master/numpy/matlib.py#L310-L358
|
INDArray |
reshape(char order,
int rows,
int columns)
Reshapes the ndarray (can't change the length of the ndarray).
|
INDArray |
reshape(char order,
long... newShape)
Reshapes the ndarray (can't change the length of the ndarray).
|
INDArray |
reshape(long... newShape)
Reshapes the ndarray (can't change the length of the ndarray).
|
INDArray |
reshape(long rows,
long columns)
Reshapes the ndarray (can't change the length of the ndarray).
|
int |
rows()
Returns the number of rows in this matrix (throws exception if not 2d)
|
INDArray |
rsub(INDArray other)
Element-wise reverse subtraction (copy op).
|
INDArray |
rsub(INDArray other,
INDArray result)
Reverse subtraction
|
INDArray |
rsub(Number n)
Reverse subtraction with duplicates - i.e., (n - thisArrayValues)
|
INDArray |
rsub(Number n,
INDArray result)
Reverse subtraction
|
INDArray |
rsubColumnVector(INDArray columnVector)
Reverse subtraction of a column vector (copy)
|
INDArray |
rsubi(INDArray other)
Element-wise reverse subtraction (in the place op) - i.e., other - this
|
INDArray |
rsubi(INDArray other,
INDArray result)
Reverse subtraction (in-place)
|
INDArray |
rsubi(Number n)
Reverse subtraction in place - i.e., (n - thisArrayValues)
|
INDArray |
rsubi(Number n,
INDArray result)
Reverse in place subtraction
|
INDArray |
rsubiColumnVector(INDArray columnVector)
In place reverse subtraction of a column vector
|
INDArray |
rsubiRowVector(INDArray rowVector)
In place reverse subtraction of a row vector
|
INDArray |
rsubRowVector(INDArray rowVector)
Reverse subtraction of a row vector (copy)
|
Number |
scan(Condition condition)
This method takes boolean condition, and returns number of elements matching this condition
|
void |
setData(DataBuffer data) |
void |
setOrder(char order)
Set the ordering
|
void |
setShapeAndStride(int[] shape,
int[] stride)
Shape and stride setter
|
protected void |
setShapeInformation(org.nd4j.linalg.primitives.Pair<DataBuffer,long[]> shapeInfo) |
INDArray |
shannonEntropy(int... dimension)
Returns Shannon entropy value for this INDArray along specified dimension(s)
|
Number |
shannonEntropyNumber()
Returns non-normalized Shannon entropy value for this INDArray
|
long[] |
shape()
Returns the shape of this ndarray
|
LongBuffer |
shapeInfo()
Shape info
|
DataBuffer |
shapeInfoDataBuffer()
Shape info
|
long[] |
shapeInfoJava()
This method returns shapeInformation as jvm long array
|
String |
shapeInfoToString()
Returns the shape information debugging information
|
protected DataBuffer |
shapeOf() |
long |
size(int dimension)
Returns the size along a specified dimension
|
INDArray |
slice(long i)
Returns the specified slice of this ndarray
|
INDArray |
slice(long i,
int dimension)
Returns the specified slice of this ndarray
|
long |
slices()
Returns the number of slices in this ndarray
|
void |
sliceVectors(List<INDArray> list)
Flattens the array for linear indexing in list.
|
DataBuffer |
sparseInfoDataBuffer()
Sparse info
|
int[] |
sparseOffsets() |
double |
squaredDistance(INDArray other)
Returns the square of the Euclidean distance.
|
INDArray |
std(boolean biasCorrected,
boolean keepDims,
int... dimension)
Standard deviation of an ndarray along a dimension
|
INDArray |
std(boolean biasCorrected,
int... dimension)
Standard deviation of an ndarray along a dimension
|
INDArray |
std(int... dimension)
Standard deviation of an INDArray along one or more dimensions
|
Number |
stdNumber()
Calculate the standard deviation for the entire array
|
Number |
stdNumber(boolean biasCorrected)
Calculate the standard deviation for the entire array, specifying whether it is bias corrected or not
|
long[] |
stride()
Returns the stride of this ndarray
|
int |
stride(int dimension)
Calculate the stride along a particular dimension
|
protected DataBuffer |
strideOf() |
INDArray |
sub(INDArray other)
copy subtraction of two NDArrays
|
INDArray |
sub(INDArray other,
INDArray result)
copy subtraction of two NDArrays
|
INDArray |
sub(Number n)
Scalar subtraction (copied)
|
INDArray |
sub(Number n,
INDArray result)
Subtraction of this ndarray
|
INDArray |
subColumnVector(INDArray columnVector)
Subtraction of a column vector (copy)
|
INDArray |
subi(INDArray other)
in place (element wise) subtraction of two NDArrays
|
INDArray |
subi(INDArray other,
INDArray result)
in place (element wise) subtraction of two NDArrays
|
INDArray |
subi(Number n)
In place scalar subtraction
|
INDArray |
subi(Number n,
INDArray result)
In place subtraction of this ndarray
|
INDArray |
subiColumnVector(INDArray columnVector)
In place subtraction of a column vector
|
INDArray |
subiRowVector(INDArray rowVector)
In place subtraction of a row vector
|
INDArray |
subRowVector(INDArray rowVector)
Subtraction of a row vector (copy)
|
INDArray |
sum(boolean keepDims,
int... dimension)
Returns the sum along the last dimension of this ndarray
|
INDArray |
sum(INDArray result,
boolean keepDims,
int... dimension)
Returns the sum along the last dimension of this ndarray
|
INDArray |
sum(INDArray result,
int... dimension)
Returns the sum along the last dimension of this ndarray
|
INDArray |
sum(int... dimension)
Returns the sum along the last dimension of this ndarray
|
Number |
sumNumber()
Sum the entire array
|
INDArray |
swapAxes(int dimension,
int with)
Mainly here for people coming from numpy.
|
INDArray |
tensorAlongDimension(long index,
int... dimension)
Get the vector along a particular dimension
|
long |
tensorsAlongDimension(int... dimension)
Returns the number of possible vectors for a given dimension
|
INDArray |
toDense()
Return a dense representation of the sparse ndarray
|
double[][] |
toDoubleMatrix()
Convert this ndarray to a 2d double matrix.
|
double[] |
toDoubleVector()
Convert this ndarray to a 1d double matrix.
|
float[][] |
toFloatMatrix()
Convert this ndarray to a 2d float matrix.
|
float[] |
toFloatVector()
Convert this ndarray to a 1d float vector.
|
int[][] |
toIntMatrix()
Convert this ndarray to a 2d int matrix.
|
int[] |
toIntVector()
Convert this ndarray to a 1d int matrix.
|
long[][] |
toLongMatrix()
Convert this ndarray to a 2d int matrix.
|
long[] |
toLongVector()
Convert this ndarray to a 1d long matrix.
|
String |
toString() |
String |
toString(long maxElements,
boolean forceSummarize,
int decimalPlaces)
Get a string representation of the array
|
String |
toString(NDArrayStrings options)
Get a string representation of the array with configurable formatting
|
String |
toStringFull()
ToString with unlimited elements and precision
|
INDArray |
transpose()
Flip the rows and columns of a matrix
|
INDArray |
transposei()
Flip the rows and columns of a matrix, in-place
|
INDArray |
ulike()
This method returns uninitialized array with the same dtype/order/shape as this one
|
INDArray |
unsafeDuplication()
Perform efficient (but unsafe) duplication.
|
INDArray |
unsafeDuplication(boolean blocking)
Perform efficient (but unsafe) duplication.
|
INDArray |
var(boolean biasCorrected,
int... dimension)
Returns the overall variance of this ndarray
|
INDArray |
var(int... dimension)
Returns the overall variance of this ndarray
|
Number |
varNumber()
Returns the overall variance of all values in this INDArray
|
INDArray |
vectorAlongDimension(int index,
int dimension)
Get the vector along a particular dimension
|
long |
vectorsAlongDimension(int dimension)
Returns the number of possible vectors for a given dimension
|
finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetFormat, getVectorCoordinatesassign, castTo, close, closeable, data, getLong, getString, isB, isEmpty, isR, isS, isView, isZ, mmul, mmul, mmuli, mmuli, putiColumnVector, putiRowVector, repeat, reshape, reshape, reshape, shapeDescriptor, toFlatArray, underlyingRank, wasClosedprotected static final double THRESHOLD_MEMORY_ALLOCATION
protected long rows
protected long columns
protected int rank
protected Boolean isVector
protected Boolean isMatrix
protected Boolean isScalar
protected long length
public static final boolean isSparse
protected transient volatile DataBuffer shapeInformation
protected transient volatile long[] javaShapeInformation
protected transient volatile DataBuffer sparseInformation
protected transient DataBuffer shape
protected transient DataBuffer stride
protected DataBuffer reallocate(DataBuffer buffer)
protected Object clone() throws CloneNotSupportedException
clone in class ObjectCloneNotSupportedExceptionpublic boolean isColumnVectorOrScalar()
INDArrayisColumnVectorOrScalar in interface INDArraypublic boolean isRowVectorOrScalar()
INDArrayisRowVectorOrScalar in interface INDArraypublic INDArray get(INDArray indices)
INDArraypublic double[][] toDoubleMatrix()
INDArraytoDoubleMatrix in interface INDArraypublic double[] toDoubleVector()
INDArraytoDoubleVector in interface INDArraypublic float[] toFloatVector()
INDArraytoFloatVector in interface INDArraypublic float[][] toFloatMatrix()
INDArraytoFloatMatrix in interface INDArraypublic int[] toIntVector()
INDArraytoIntVector in interface INDArraypublic long[] toLongVector()
INDArraytoLongVector in interface INDArraypublic long[][] toLongMatrix()
INDArraytoLongMatrix in interface INDArraypublic int[][] toIntMatrix()
INDArraytoIntMatrix in interface INDArraypublic INDArray match(INDArray comp, Condition condition)
INDArraypublic INDArray match(Number comp, Condition condition)
INDArraypublic INDArray putWhereWithMask(INDArray mask, INDArray put)
INDArrayputWhereWithMask in interface INDArraymask - the mask to useput - the array to putpublic INDArray putWhereWithMask(INDArray mask, Number put)
INDArrayputWhereWithMask in interface INDArraymask - the mask to useput - the array to putpublic INDArray toDense()
ISparseNDArraytoDense in interface INDArraytoDense in interface ISparseNDArraypublic INDArray getWhere(INDArray comp, Condition condition)
INDArraypublic INDArray getWhere(Number comp, Condition condition)
INDArraypublic INDArray putWhere(INDArray comp, INDArray put, Condition condition)
INDArraypublic INDArray putWhere(Number comp, INDArray put, Condition condition)
INDArraypublic INDArray putWhere(Number comp, Number put, Condition condition)
INDArraypublic INDArray put(INDArray indices, INDArray element)
INDArraypublic boolean isSparse()
INDArraypublic long length()
INDArraypublic int nnz()
ISparseNDArraynnz in interface INDArraynnz in interface ISparseNDArrayprotected void init(long[] shape)
public String shapeInfoToString()
INDArrayshapeInfoToString in interface INDArraypublic DataBuffer shapeInfoDataBuffer()
INDArrayshapeInfoDataBuffer in interface INDArraypublic DataBuffer sparseInfoDataBuffer()
INDArraysparseInfoDataBuffer in interface INDArraypublic LongBuffer shapeInfo()
INDArraypublic boolean isCompressed()
INDArrayisCompressed in interface INDArraypublic void markAsCompressed(boolean reallyCompressed)
INDArraymarkAsCompressed in interface INDArrayreallyCompressed - new value for compressed.public int rank()
INDArraypublic int[] hiddenDimensions()
hiddenDimensions in interface INDArraypublic int[] sparseOffsets()
sparseOffsets in interface INDArraypublic int stride(int dimension)
INDArrayprotected DataBuffer strideOf()
public int elementWiseStride()
INDArrayelementWiseStride in interface INDArraypublic double getDoubleUnsafe(long offset)
INDArraygetDoubleUnsafe in interface INDArrayoffset - the offset to get atpublic INDArray putScalarUnsafe(long offset, double value)
INDArrayputScalarUnsafe in interface INDArrayoffset - the offset to insert atvalue - the value to insertpublic long vectorsAlongDimension(int dimension)
INDArrayvectorsAlongDimension in interface INDArraydimension - the dimension to calculate the number of vectors forpublic INDArray vectorAlongDimension(int index, int dimension)
INDArrayvectorAlongDimension in interface INDArrayindex - the index of the vector to getScalardimension - the dimension to getScalar the vector frompublic long tensorsAlongDimension(int... dimension)
INDArraytensorsAlongDimension in interface INDArraydimension - the dimension to calculate the number of vectors forpublic INDArray tensorAlongDimension(long index, int... dimension)
INDArraytensorAlongDimension in interface INDArrayindex - the index of the vector to getScalardimension - the dimension to getScalar the vector frompublic INDArray cumsumi(int dimension)
INDArraypublic INDArray cumsum(int dimension)
INDArraypublic INDArray assign(INDArray arr)
INDArraypublic INDArray assignIf(INDArray arr, Condition condition)
INDArraypublic INDArray replaceWhere(INDArray arr, Condition condition)
INDArrayreplaceWhere in interface INDArrayarr - Source arraycondition - Condition to applypublic INDArray putScalar(long i, double value)
INDArraypublic INDArray putScalar(long i, float value)
INDArraypublic INDArray putScalar(long i, int value)
INDArraypublic INDArray putScalar(int[] i, double value)
INDArraypublic INDArray putScalar(long[] i, double value)
INDArraypublic INDArray putScalar(long[] i, float value)
INDArraypublic INDArray putScalar(long[] i, int value)
INDArraypublic INDArray isInfinite()
INDArrayisInfinite in interface INDArraypublic INDArray isNaN()
INDArraypublic INDArray putScalar(long row, long col, double value)
INDArrayINDArray.putScalar(int[], double) but avoids int[] creationpublic INDArray putScalar(long dim0, long dim1, long dim2, double value)
INDArrayINDArray.putScalar(int[], double) but avoids int[] creationpublic INDArray putScalar(long dim0, long dim1, long dim2, long dim3, double value)
INDArrayINDArray.putScalar(int[], double) but avoids int[] creationpublic INDArray lt(Number other)
INDArraypublic INDArray putScalar(int[] indexes, float value)
INDArraypublic INDArray putScalar(int[] indexes, int value)
INDArraypublic INDArray eps(Number other)
INDArraypublic INDArray eq(Number other)
INDArraypublic INDArray gt(Number other)
INDArraypublic INDArray gte(Number other)
INDArraypublic INDArray lte(Number other)
INDArraypublic INDArray lt(INDArray other)
INDArraypublic INDArray eps(INDArray other)
INDArraypublic INDArray neq(Number other)
INDArraypublic INDArray neq(INDArray other)
INDArraypublic INDArray eq(INDArray other)
INDArraypublic INDArray gt(INDArray other)
INDArraypublic INDArray neg()
INDArraypublic INDArray negi()
INDArraypublic INDArray rdiv(Number n)
INDArraypublic INDArray rdivi(Number n)
INDArraypublic INDArray rsub(Number n)
INDArraypublic INDArray rsubi(Number n)
INDArraypublic INDArray divi(Number n)
INDArraypublic INDArray mul(Number n)
INDArraypublic INDArray muli(Number n)
INDArraypublic INDArray sub(Number n)
INDArraypublic INDArray subi(Number n)
INDArraypublic INDArray add(Number n)
INDArraypublic INDArray addi(Number n)
INDArraypublic INDArray rdiv(Number n, INDArray result)
INDArraypublic INDArray rdivi(Number n, INDArray result)
INDArraypublic INDArray rsub(Number n, INDArray result)
INDArraypublic INDArray rsubi(Number n, INDArray result)
INDArraypublic INDArray div(Number n, INDArray result)
INDArraypublic INDArray divi(Number n, INDArray result)
INDArraypublic INDArray mul(Number n, INDArray result)
INDArraypublic INDArray muli(Number n, INDArray result)
INDArraypublic INDArray sub(Number n, INDArray result)
INDArraypublic INDArray subi(Number n, INDArray result)
INDArraypublic INDArray add(Number n, INDArray result)
INDArraypublic INDArray addi(Number n, INDArray result)
INDArraypublic INDArray get(INDArrayIndex... indexes)
INDArraypublic INDArray getColumns(int... columns)
INDArraygetColumns in interface INDArraycolumns - Columns to extract out of the current arraypublic INDArray getRows(int... rows)
INDArraypublic INDArray rdiv(INDArray other)
INDArraypublic INDArray rdivi(INDArray other)
INDArraypublic INDArray rdiv(INDArray other, INDArray result)
INDArraypublic INDArray rdivi(INDArray other, INDArray result)
INDArraypublic INDArray rsub(INDArray other, INDArray result)
INDArraypublic INDArray rsub(INDArray other)
INDArraypublic INDArray rsubi(INDArray other)
INDArraypublic INDArray rsubi(INDArray other, INDArray result)
INDArraypublic INDArray assign(Number value)
INDArraypublic long linearIndex(long i)
INDArraylinearIndex in interface INDArrayi - the index to getScalarpublic void sliceVectors(List<INDArray> list)
INDArraysliceVectors in interface INDArraypublic INDArray putSlice(int slice, INDArray put)
INDArraypublic INDArray cond(Condition condition)
INDArraypublic INDArray repmat(int... shape)
INDArraypublic INDArray putRow(long row, INDArray toPut)
INDArraypublic INDArray putColumn(int column, INDArray toPut)
INDArraypublic INDArray getScalar(long row, long column)
INDArraypublic INDArray getScalar(long i)
INDArraypublic double squaredDistance(INDArray other)
INDArraysquaredDistance in interface INDArraypublic double distance2(INDArray other)
INDArraypublic double distance1(INDArray other)
INDArraypublic INDArray put(INDArrayIndex[] indices, INDArray element)
INDArraypublic INDArray put(INDArrayIndex[] indices, Number element)
INDArraypublic INDArray put(int[] indices, INDArray element)
INDArraypublic INDArray put(int i, int j, INDArray element)
INDArraypublic INDArray put(int i, int j, Number element)
INDArraypublic INDArray put(int i, INDArray element)
INDArraypublic INDArray diviColumnVector(INDArray columnVector)
INDArraydiviColumnVector in interface INDArraycolumnVector - the column vector used for divisionpublic INDArray divColumnVector(INDArray columnVector)
INDArraydivColumnVector in interface INDArraycolumnVector - the column vector used for divisionpublic INDArray diviRowVector(INDArray rowVector)
INDArraydiviRowVector in interface INDArrayrowVector - the row vector used for divisionpublic INDArray divRowVector(INDArray rowVector)
INDArraydivRowVector in interface INDArrayrowVector - the row vector used for divisionpublic INDArray rdiviColumnVector(INDArray columnVector)
INDArrayrdiviColumnVector in interface INDArraycolumnVector - the column vector used for divisionpublic INDArray rdivColumnVector(INDArray columnVector)
INDArrayrdivColumnVector in interface INDArraycolumnVector - the column vector used for divisionpublic INDArray rdiviRowVector(INDArray rowVector)
INDArrayrdiviRowVector in interface INDArrayrowVector - the row vector used for divisionpublic INDArray rdivRowVector(INDArray rowVector)
INDArrayrdivRowVector in interface INDArrayrowVector - the row vector used for divisionpublic INDArray muliColumnVector(INDArray columnVector)
INDArraymuliColumnVector in interface INDArraycolumnVector - the column vector used for multiplicationpublic INDArray mulColumnVector(INDArray columnVector)
INDArraymulColumnVector in interface INDArraycolumnVector - the column vector used for multiplicationpublic INDArray muliRowVector(INDArray rowVector)
INDArraymuliRowVector in interface INDArrayrowVector - the row vector used for multiplicationpublic INDArray mulRowVector(INDArray rowVector)
INDArraymulRowVector in interface INDArrayrowVector - the row vector used for multiplicationpublic INDArray rsubiColumnVector(INDArray columnVector)
INDArrayrsubiColumnVector in interface INDArraycolumnVector - the column vector to subtractpublic INDArray rsubColumnVector(INDArray columnVector)
INDArrayrsubColumnVector in interface INDArraycolumnVector - the column vector to subtractpublic INDArray rsubiRowVector(INDArray rowVector)
INDArrayrsubiRowVector in interface INDArrayrowVector - the row vector to subtractpublic INDArray rsubRowVector(INDArray rowVector)
INDArrayrsubRowVector in interface INDArrayrowVector - the row vector to subtractpublic INDArray subiColumnVector(INDArray columnVector)
INDArraysubiColumnVector in interface INDArraycolumnVector - the column vector to subtractpublic INDArray subColumnVector(INDArray columnVector)
INDArraysubColumnVector in interface INDArraycolumnVector - the column vector to subtractpublic INDArray subiRowVector(INDArray rowVector)
INDArraysubiRowVector in interface INDArrayrowVector - the row vector to subtractpublic INDArray subRowVector(INDArray rowVector)
INDArraysubRowVector in interface INDArrayrowVector - the row vector to subtractpublic INDArray addiColumnVector(INDArray columnVector)
INDArrayaddiColumnVector in interface INDArraycolumnVector - the column vector to addpublic INDArray addColumnVector(INDArray columnVector)
INDArrayaddColumnVector in interface INDArraycolumnVector - the column vector to addpublic INDArray addiRowVector(INDArray rowVector)
INDArrayaddiRowVector in interface INDArrayrowVector - the row vector to addpublic INDArray addRowVector(INDArray rowVector)
INDArrayaddRowVector in interface INDArrayrowVector - the row vector to addpublic INDArray mmul(INDArray other)
INDArraypublic INDArray mmul(INDArray other, INDArray result)
INDArraypublic INDArray div(INDArray other)
INDArraypublic INDArray div(INDArray other, INDArray result)
INDArraypublic INDArray mul(INDArray other)
INDArraypublic INDArray mul(INDArray other, INDArray result)
INDArraypublic INDArray sub(INDArray other)
INDArraypublic INDArray sub(INDArray other, INDArray result)
INDArraypublic INDArray add(INDArray other)
INDArraypublic INDArray add(INDArray other, INDArray result)
INDArraypublic INDArray mmuli(INDArray other)
INDArraypublic INDArray mmuli(INDArray other, INDArray result)
INDArraypublic INDArray divi(INDArray other)
INDArraypublic INDArray divi(INDArray other, INDArray result)
INDArraypublic INDArray muli(INDArray other)
INDArraypublic INDArray muli(INDArray other, INDArray result)
INDArraypublic INDArray subi(INDArray other)
INDArraypublic INDArray subi(INDArray other, INDArray result)
INDArraypublic INDArray addi(INDArray other)
INDArraypublic INDArray addi(INDArray other, INDArray result)
INDArraypublic INDArray normmax(int... dimension)
INDArraypublic Number normmaxNumber()
INDArraynormmaxNumber in interface INDArraypublic INDArray norm2(int... dimension)
INDArraypublic Number norm2Number()
INDArraynorm2Number in interface INDArraypublic INDArray norm1(int... dimension)
INDArraypublic Number norm1Number()
INDArraynorm1Number in interface INDArraypublic INDArray std(int... dimension)
INDArraypublic Number stdNumber()
INDArraypublic INDArray std(boolean biasCorrected, int... dimension)
INDArraypublic Number stdNumber(boolean biasCorrected)
INDArraypublic INDArray prod(int... dimension)
INDArraypublic Number prodNumber()
INDArrayprodNumber in interface INDArraypublic INDArray mean(int... dimension)
INDArraypublic Number meanNumber()
INDArraymeanNumber in interface INDArraypublic INDArray var(int... dimension)
INDArraypublic INDArray var(boolean biasCorrected, int... dimension)
INDArraypublic Number varNumber()
INDArraypublic INDArray max(int... dimension)
INDArraypublic Number maxNumber()
INDArraypublic INDArray min(int... dimension)
INDArraypublic Number minNumber()
INDArraypublic INDArray sum(int... dimension)
INDArraypublic INDArray sum(boolean keepDims, int... dimension)
INDArraypublic Number sumNumber()
INDArraypublic INDArray normmax(boolean keepDims, int... dimension)
INDArraypublic INDArray norm2(boolean keepDims, int... dimension)
INDArraypublic INDArray norm1(boolean keepDims, int... dimension)
INDArraypublic INDArray std(boolean biasCorrected, boolean keepDims, int... dimension)
INDArraypublic INDArray prod(boolean keepDims, int... dimension)
INDArraypublic INDArray mean(boolean keepDims, int... dimension)
INDArraypublic INDArray mean(INDArray result, boolean keepDims, int... dimension)
INDArraypublic INDArray max(boolean keepDims, int... dimension)
INDArraypublic INDArray min(boolean keepDims, int... dimension)
INDArraypublic INDArray sum(INDArray result, boolean keepDims, int... dimension)
INDArraypublic void setShapeAndStride(int[] shape,
int[] stride)
INDArraysetShapeAndStride in interface INDArrayshape - new value for shapestride - new value for stridepublic void setOrder(char order)
INDArraypublic INDArray getScalar(int... indices)
INDArraypublic int getInt(int... indices)
INDArraypublic double getDouble(int... indices)
INDArraypublic float getFloat(int[] indices)
INDArraypublic double getDouble(long i)
INDArraypublic double getDouble(long i,
long j)
INDArraypublic float getFloat(long i)
INDArraypublic float getFloat(long i,
long j)
INDArraypublic INDArray dup()
INDArraypublic INDArray dup(char order)
INDArraypublic INDArray ravel()
INDArraypublic INDArray ravel(char order)
INDArraypublic void setData(DataBuffer data)
public long slices()
INDArraypublic int getTrailingOnes()
INDArraygetTrailingOnes in interface INDArraypublic int getLeadingOnes()
INDArraygetLeadingOnes in interface INDArraypublic INDArray slice(long i, int dimension)
INDArraypublic INDArray slice(long i)
INDArraypublic long offset()
INDArraypublic long originalOffset()
INDArrayoriginalOffset in interface INDArraypublic INDArray reshape(char order, long... newShape)
INDArraypublic INDArray reshape(char order, int rows, int columns)
INDArraypublic INDArray reshape(long... newShape)
INDArraypublic INDArray reshape(long rows, long columns)
INDArraypublic INDArray transpose()
INDArraypublic INDArray transposei()
INDArraytransposei in interface INDArraypublic INDArray swapAxes(int dimension, int with)
INDArraypublic INDArray permute(int... rearrange)
INDArraypublic INDArray permutei(int... rearrange)
INDArraypublic INDArray dimShuffle(Object[] rearrange, int[] newOrder, boolean[] broadCastable)
INDArraydimShuffle in interface INDArrayrearrange - the dimensions to swap tonewOrder - the new order (think permute)broadCastable - (whether the dimension is broadcastable) (must be same length as new order)public INDArray broadcast(INDArray result)
INDArraypublic INDArray dimShuffle(Object[] rearrange, long[] newOrder, boolean[] broadCastable)
dimShuffle in interface INDArraypublic INDArray getColumn(long i)
INDArraypublic INDArray getColumn(long i, boolean keepDim)
INDArraypublic INDArray getRow(long i)
INDArraypublic INDArray getRow(long i, boolean keepDim)
INDArraypublic int columns()
INDArraypublic int rows()
INDArraypublic boolean isVector()
public boolean isVectorOrScalar()
INDArrayisVectorOrScalar in interface INDArraypublic boolean isSquare()
INDArraypublic boolean isRowVector()
isRowVector in interface INDArraypublic boolean isColumnVector()
isColumnVector in interface INDArraypublic boolean isMatrix()
INDArraypublic boolean isScalar()
INDArraypublic char ordering()
INDArraypublic long[] shape()
INDArrayprotected DataBuffer shapeOf()
public long[] stride()
INDArraypublic long size(int dimension)
INDArrayprotected void setShapeInformation(org.nd4j.linalg.primitives.Pair<DataBuffer,long[]> shapeInfo)
public INDArray broadcast(long... shape)
INDArraypublic Object element()
INDArraypublic boolean equalShapes(@NonNull
INDArray other)
INDArrayequalShapes in interface INDArrayother - Otherpublic boolean equalsWithEps(Object o, double eps)
INDArrayequalsWithEps in interface INDArrayeps - Epsilon value to use for the quality operationpublic INDArray unsafeDuplication()
INDArrayINDArray.dup()unsafeDuplication in interface INDArraypublic INDArray remainder(INDArray denominator)
INDArraypublic INDArray remainder(INDArray denominator, INDArray result)
INDArraypublic INDArray remainder(Number denominator)
INDArraypublic INDArray remainderi(INDArray denominator)
INDArrayremainderi in interface INDArraypublic INDArray remainderi(Number denominator)
INDArrayremainderi in interface INDArraypublic INDArray fmod(INDArray denominator)
INDArraypublic INDArray fmod(INDArray denominator, INDArray result)
INDArraypublic INDArray fmodi(INDArray denominator)
INDArraypublic INDArray fmodi(Number denominator)
INDArraypublic INDArray argMax(int... dimension)
INDArraypublic boolean isAttached()
INDArrayisAttached in interface INDArraypublic boolean isInScope()
INDArraypublic INDArray detach()
INDArraypublic INDArray leverage()
INDArraypublic INDArray leverageTo(String id)
INDArrayleverageTo in interface INDArrayid - ID of the workspace to leverage toINDArray.leverageTo(String, boolean)public INDArray leverageTo(String id, boolean enforceExistence) throws Nd4jNoSuchWorkspaceException
INDArrayNd4jNoSuchWorkspaceException
is thrown. Otherwise, if enforceExistance == false and no workspace with the specified ID exists, then the current
INDArray is returned unmodified (same as INDArray.leverage()leverageTo in interface INDArrayid - ID of the workspace to leverage toenforceExistence - If true, and the specified workspace does not exist: an Nd4jNoSuchWorkspaceException
will be thrown.Nd4jNoSuchWorkspaceExceptionINDArray.leverageTo(String)public INDArray leverageOrDetach(String id)
INDArrayleverageOrDetach in interface INDArrayid - ID of the workspace to leverage toINDArray.leverageTo(String)public INDArray migrate()
INDArraymigrate in interface INDArrayINDArray.migrate(boolean)public INDArray migrate(boolean detachIfNoWs)
INDArrayINDArray.migrate()public INDArray sum(INDArray result, int... dimension)
INDArraypublic INDArray mean(INDArray result, int... dimension)
INDArraypublic INDArray amean(int... dimension)
INDArraypublic Number ameanNumber()
INDArrayameanNumber in interface INDArraypublic INDArray amax(int... dimension)
INDArraypublic Number amaxNumber()
INDArrayamaxNumber in interface INDArraypublic INDArray amin(int... dimension)
INDArraypublic Number aminNumber()
INDArrayaminNumber in interface INDArraypublic Number scan(Condition condition)
INDArraypublic INDArray unsafeDuplication(boolean blocking)
INDArrayINDArray.dup()unsafeDuplication in interface INDArraypublic Number entropyNumber()
INDArrayentropyNumber in interface INDArraypublic Number shannonEntropyNumber()
INDArrayshannonEntropyNumber in interface INDArraypublic Number logEntropyNumber()
INDArraylogEntropyNumber in interface INDArraypublic INDArray entropy(int... dimension)
INDArraypublic INDArray shannonEntropy(int... dimension)
INDArrayshannonEntropy in interface INDArraydimension - specified dimension(s)public INDArray logEntropy(int... dimension)
logEntropy in interface INDArraydimension - public Number percentileNumber(Number quantile)
INDArraypercentileNumber in interface INDArrayquantile - target percentile in range of 0..100public Number medianNumber()
INDArraymedianNumber in interface INDArraypublic INDArray median(int... dimension)
INDArraypublic INDArray percentile(Number quantile, int... dimension)
INDArraypercentile in interface INDArrayquantile - target percentile in range of 0..100dimension - Dimension to calculate percentile forpublic long[] shapeInfoJava()
INDArrayshapeInfoJava in interface INDArraypublic DataType dataType()
INDArraypublic boolean all()
INDArraypublic boolean any()
INDArraypublic boolean none()
INDArraypublic INDArray like()
INDArraypublic INDArray ulike()
INDArraypublic String toString(NDArrayStrings options)
INDArraypublic String toString(long maxElements, boolean forceSummarize, int decimalPlaces)
INDArraypublic String toStringFull()
INDArraytoStringFull in interface INDArrayBaseNDArray.toString(long, boolean, int)Copyright © 2019. All rights reserved.