INDArray javadoc (#246)
* javadoc Signed-off-by: Robert Altena <Rob@Ra-ai.com> * javadoc Signed-off-by: Robert Altena <Rob@Ra-ai.com> * javadoc Signed-off-by: Robert Altena <Rob@Ra-ai.com> * review fixes. Signed-off-by: Robert Altena <Rob@Ra-ai.com>master
parent
46f8c58502
commit
c99f980513
|
@ -1724,12 +1724,6 @@ public abstract class BaseNDArray implements INDArray, Iterable {
|
||||||
return z;
|
return z;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns the elements at the specified indices
|
|
||||||
*
|
|
||||||
* @param indices the indices to getScalar
|
|
||||||
* @return the array with the specified elements
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public int getInt(int... indices) {
|
public int getInt(int... indices) {
|
||||||
return (int) getDouble(indices);
|
return (int) getDouble(indices);
|
||||||
|
@ -1761,12 +1755,6 @@ public abstract class BaseNDArray implements INDArray, Iterable {
|
||||||
return Shape.getLong(this, indices);
|
return Shape.getLong(this, indices);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns the elements at the specified indices
|
|
||||||
*
|
|
||||||
* @param indices the indices to get
|
|
||||||
* @return the array with the specified elements
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public double getDouble(int... indices) {
|
public double getDouble(int... indices) {
|
||||||
autoProcessScalarCall();
|
autoProcessScalarCall();
|
||||||
|
@ -1815,12 +1803,6 @@ public abstract class BaseNDArray implements INDArray, Iterable {
|
||||||
return Shape.getDouble(this, indices);
|
return Shape.getDouble(this, indices);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns the elements at the specified indices
|
|
||||||
*
|
|
||||||
* @param indices the indices to get
|
|
||||||
* @return the array with the specified elements
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public float getFloat(int... indices) {
|
public float getFloat(int... indices) {
|
||||||
return (float) getDouble(indices);
|
return (float) getDouble(indices);
|
||||||
|
@ -1831,9 +1813,6 @@ public abstract class BaseNDArray implements INDArray, Iterable {
|
||||||
return (float) getDouble(indices);
|
return (float) getDouble(indices);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Test whether a matrix is scalar.
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isScalar() {
|
public boolean isScalar() {
|
||||||
if (isEmpty())
|
if (isEmpty())
|
||||||
|
@ -2000,11 +1979,6 @@ public abstract class BaseNDArray implements INDArray, Iterable {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns true if this ndarray is 2d
|
|
||||||
*
|
|
||||||
* @return true if the element is a matrix, false otherwise
|
|
||||||
*/
|
|
||||||
public boolean isMatrix() {
|
public boolean isMatrix() {
|
||||||
return rank() == 2;
|
return rank() == 2;
|
||||||
}
|
}
|
||||||
|
@ -2216,14 +2190,6 @@ public abstract class BaseNDArray implements INDArray, Iterable {
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Mainly here for people coming from numpy.
|
|
||||||
* This is equivalent to a call to permute
|
|
||||||
*
|
|
||||||
* @param dimension the dimension to swap
|
|
||||||
* @param with the one to swap it with
|
|
||||||
* @return the swapped axes view
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public INDArray swapAxes(int dimension, int with) {
|
public INDArray swapAxes(int dimension, int with) {
|
||||||
int[] shape = ArrayUtil.range(0, shape().length);
|
int[] shape = ArrayUtil.range(0, shape().length);
|
||||||
|
@ -2263,12 +2229,6 @@ public abstract class BaseNDArray implements INDArray, Iterable {
|
||||||
this.data = data;
|
this.data = data;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Number of slices: aka shape[0]
|
|
||||||
*
|
|
||||||
* @return the number of slices
|
|
||||||
* for this nd array
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public long slices() {
|
public long slices() {
|
||||||
return size(0);
|
return size(0);
|
||||||
|
@ -3377,18 +3337,6 @@ public abstract class BaseNDArray implements INDArray, Iterable {
|
||||||
return Shape.offset(jvmShapeInfo.javaShapeInformation) + (idx);
|
return Shape.offset(jvmShapeInfo.javaShapeInformation) + (idx);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns the specified slice of this matrix.
|
|
||||||
* In matlab, this would be equivalent to (given a 2 x 2 x 2):
|
|
||||||
* A(:,:,x) where x is the slice you want to return.
|
|
||||||
* <p/>
|
|
||||||
* The slice is always relative to the final dimension of the matrix.
|
|
||||||
*
|
|
||||||
* @param slice the slice to return
|
|
||||||
* @return the specified slice of this matrix
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public INDArray slice(long slice) {
|
public INDArray slice(long slice) {
|
||||||
Nd4j.getCompressor().autoDecompress(this);
|
Nd4j.getCompressor().autoDecompress(this);
|
||||||
|
@ -3425,8 +3373,6 @@ public abstract class BaseNDArray implements INDArray, Iterable {
|
||||||
return Nd4j.scalar(d);
|
return Nd4j.scalar(d);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getTrailingOnes() {
|
public int getTrailingOnes() {
|
||||||
int numLeadingOnes = 0;
|
int numLeadingOnes = 0;
|
||||||
|
@ -3438,8 +3384,6 @@ public abstract class BaseNDArray implements INDArray, Iterable {
|
||||||
return numLeadingOnes;
|
return numLeadingOnes;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getLeadingOnes() {
|
public int getLeadingOnes() {
|
||||||
int numLeadingOnes = 0;
|
int numLeadingOnes = 0;
|
||||||
|
@ -3451,16 +3395,6 @@ public abstract class BaseNDArray implements INDArray, Iterable {
|
||||||
return numLeadingOnes;
|
return numLeadingOnes;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns the slice of this from the specified dimension
|
|
||||||
*
|
|
||||||
* @param slice the dimension to return from
|
|
||||||
* @param dimension the dimension of the slice to return
|
|
||||||
* @return the slice of this matrix from the specified dimension
|
|
||||||
* and dimension
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public INDArray slice(long slice, int dimension) {
|
public INDArray slice(long slice, int dimension) {
|
||||||
Nd4j.getCompressor().autoDecompress(this);
|
Nd4j.getCompressor().autoDecompress(this);
|
||||||
|
@ -3490,12 +3424,6 @@ public abstract class BaseNDArray implements INDArray, Iterable {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Fetch a particular number on a multi dimensional scale.
|
|
||||||
*
|
|
||||||
* @param indexes the indexes to get a number from
|
|
||||||
* @return the number at the specified indices
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public INDArray getScalar(int[] indexes) {
|
public INDArray getScalar(int[] indexes) {
|
||||||
if (indexes.length > rank())
|
if (indexes.length > rank())
|
||||||
|
@ -3717,9 +3645,6 @@ public abstract class BaseNDArray implements INDArray, Iterable {
|
||||||
return (float) getDouble(i, j);
|
return (float) getDouble(i, j);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Return transposed copy of this matrix.
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public INDArray transpose() {
|
public INDArray transpose() {
|
||||||
Preconditions.checkState(rank() >= 2, "Can't transpose array with rank < 2: array shape %ndShape", this);
|
Preconditions.checkState(rank() >= 2, "Can't transpose array with rank < 2: array shape %ndShape", this);
|
||||||
|
@ -3727,7 +3652,6 @@ public abstract class BaseNDArray implements INDArray, Iterable {
|
||||||
return permute(ArrayUtil.reverseCopy(ArrayUtil.range(0, rank())));
|
return permute(ArrayUtil.reverseCopy(ArrayUtil.range(0, rank())));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* Return transposed version of this matrix.
|
* Return transposed version of this matrix.
|
||||||
|
@ -4047,12 +3971,6 @@ public abstract class BaseNDArray implements INDArray, Iterable {
|
||||||
return norm2(false, dimension);
|
return norm2(false, dimension);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Number of columns (shape[1]), throws an exception when
|
|
||||||
* called when not 2d
|
|
||||||
*
|
|
||||||
* @return the number of columns in the array (only 2d)
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public int columns() {
|
public int columns() {
|
||||||
// FIXME: int cast
|
// FIXME: int cast
|
||||||
|
@ -4068,13 +3986,6 @@ public abstract class BaseNDArray implements INDArray, Iterable {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns the number of rows
|
|
||||||
* in the array (only 2d) throws an exception when
|
|
||||||
* called when not 2d
|
|
||||||
*
|
|
||||||
* @return the number of rows in the matrix
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public int rows() {
|
public int rows() {
|
||||||
// FIXME:
|
// FIXME:
|
||||||
|
@ -4089,12 +4000,6 @@ public abstract class BaseNDArray implements INDArray, Iterable {
|
||||||
throw new IllegalStateException("Rank is " + rank() + " rows() call is not valid");
|
throw new IllegalStateException("Rank is " + rank() + " rows() call is not valid");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Flattens the array for linear indexing
|
|
||||||
*
|
|
||||||
* @return the flattened version of this array
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public INDArray ravel(char ordering) {
|
public INDArray ravel(char ordering) {
|
||||||
Nd4j.getCompressor().autoDecompress(this);
|
Nd4j.getCompressor().autoDecompress(this);
|
||||||
|
@ -4104,11 +4009,6 @@ public abstract class BaseNDArray implements INDArray, Iterable {
|
||||||
return dup(ordering).reshape(ordering, length());
|
return dup(ordering).reshape(ordering, length());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Flattens the array for linear indexing
|
|
||||||
*
|
|
||||||
* @return the flattened version of this array
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public INDArray ravel() {
|
public INDArray ravel() {
|
||||||
return reshape(length());
|
return reshape(length());
|
||||||
|
@ -4125,22 +4025,11 @@ public abstract class BaseNDArray implements INDArray, Iterable {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Reshape the matrix. Number of elements must not change.
|
|
||||||
*
|
|
||||||
* @param newRows
|
|
||||||
* @param newColumns
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public INDArray reshape(long newRows, long newColumns) {
|
public INDArray reshape(long newRows, long newColumns) {
|
||||||
return reshape(new long[] {newRows, newColumns});
|
return reshape(new long[] {newRows, newColumns});
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Get the specified column
|
|
||||||
*
|
|
||||||
* @param c
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public INDArray getColumn(long c) {
|
public INDArray getColumn(long c) {
|
||||||
Nd4j.getCompressor().autoDecompress(this);
|
Nd4j.getCompressor().autoDecompress(this);
|
||||||
|
@ -4383,11 +4272,6 @@ public abstract class BaseNDArray implements INDArray, Iterable {
|
||||||
return create(new int[] {rows, length});
|
return create(new int[] {rows, length});
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Get a copy of a row.
|
|
||||||
*
|
|
||||||
* @param r the row to get
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public INDArray getRow(long r) {
|
public INDArray getRow(long r) {
|
||||||
if (isRowVector() && r == 0)
|
if (isRowVector() && r == 0)
|
||||||
|
@ -4409,14 +4293,6 @@ public abstract class BaseNDArray implements INDArray, Iterable {
|
||||||
return row.reshape(1, row.length());
|
return row.reshape(1, row.length());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* This method allows you to compare INDArray against other INDArray, with variable eps
|
|
||||||
*
|
|
||||||
* @param o
|
|
||||||
* @param eps
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
public boolean equalsWithEps(Object o, double eps) {
|
public boolean equalsWithEps(Object o, double eps) {
|
||||||
Nd4j.getCompressor().autoDecompress(this);
|
Nd4j.getCompressor().autoDecompress(this);
|
||||||
|
|
||||||
|
@ -4563,11 +4439,6 @@ public abstract class BaseNDArray implements INDArray, Iterable {
|
||||||
return shapeInformation.asNioLong();
|
return shapeInformation.asNioLong();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns the shape(dimensions) of this array
|
|
||||||
*
|
|
||||||
* @return the shape of this matrix
|
|
||||||
*/
|
|
||||||
public long[] shape() {
|
public long[] shape() {
|
||||||
return jvmShapeInfo.shape;
|
return jvmShapeInfo.shape;
|
||||||
}
|
}
|
||||||
|
@ -4577,11 +4448,6 @@ public abstract class BaseNDArray implements INDArray, Iterable {
|
||||||
return Shape.shapeToString(this);
|
return Shape.shapeToString(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns the stride(indices along the linear index for which each slice is accessed) of this array
|
|
||||||
*
|
|
||||||
* @return the stride of this array
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public long[] stride() {
|
public long[] stride() {
|
||||||
return jvmShapeInfo.stride;
|
return jvmShapeInfo.stride;
|
||||||
|
@ -4598,13 +4464,6 @@ public abstract class BaseNDArray implements INDArray, Iterable {
|
||||||
return jvmShapeInfo.order;
|
return jvmShapeInfo.order;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns the size of this array
|
|
||||||
* along a particular dimension
|
|
||||||
*
|
|
||||||
* @param dimension the dimension to return from
|
|
||||||
* @return the shape of the specified dimension
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public long size(int dimension) {
|
public long size(int dimension) {
|
||||||
if (dimension < 0)
|
if (dimension < 0)
|
||||||
|
@ -4629,11 +4488,6 @@ public abstract class BaseNDArray implements INDArray, Iterable {
|
||||||
return jvmShapeInfo.rank;
|
return jvmShapeInfo.rank;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns the total number of elements in the ndarray
|
|
||||||
*
|
|
||||||
* @return the number of elements in the ndarray
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public long length() {
|
public long length() {
|
||||||
if (isEmpty())
|
if (isEmpty())
|
||||||
|
@ -4745,12 +4599,6 @@ public abstract class BaseNDArray implements INDArray, Iterable {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Broadcasts this ndarray to be the specified shape
|
|
||||||
*
|
|
||||||
* @param shape the new shape of this ndarray
|
|
||||||
* @return the broadcasted ndarray
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public INDArray broadcast(long... shape) {
|
public INDArray broadcast(long... shape) {
|
||||||
return broadcast(Nd4j.createUninitialized(this.dataType(), shape, this.ordering()));
|
return broadcast(Nd4j.createUninitialized(this.dataType(), shape, this.ordering()));
|
||||||
|
@ -4877,12 +4725,6 @@ public abstract class BaseNDArray implements INDArray, Iterable {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* See: http://www.mathworks.com/help/matlab/ref/permute.html
|
|
||||||
*
|
|
||||||
* @param rearrange the dimensions to swap to
|
|
||||||
* @return the newly permuted array
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public INDArray permute(int... rearrange) {
|
public INDArray permute(int... rearrange) {
|
||||||
Preconditions.checkArgument(rearrange.length == rank(), "Incorrect number of arguments for permute function:" +
|
Preconditions.checkArgument(rearrange.length == rank(), "Incorrect number of arguments for permute function:" +
|
||||||
|
@ -4911,14 +4753,6 @@ public abstract class BaseNDArray implements INDArray, Iterable {
|
||||||
return value;
|
return value;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* An <b>in-place</b> version of permute. The array shape information (shape, strides)
|
|
||||||
* is modified by this operation (but not the data itself)
|
|
||||||
* See: http://www.mathworks.com/help/matlab/ref/permute.html
|
|
||||||
*
|
|
||||||
* @param rearrange the dimensions to swap to
|
|
||||||
* @return the current array
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public INDArray permutei(int... rearrange) {
|
public INDArray permutei(int... rearrange) {
|
||||||
Preconditions.checkArgument(rearrange.length == rank(), "Incorrect number of arguments for permute function:" +
|
Preconditions.checkArgument(rearrange.length == rank(), "Incorrect number of arguments for permute function:" +
|
||||||
|
@ -5047,17 +4881,11 @@ public abstract class BaseNDArray implements INDArray, Iterable {
|
||||||
return isMatrix() && rows() == columns();
|
return isMatrix() && rows() == columns();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Checks whether the matrix is a row vector.
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isRowVector() {
|
public boolean isRowVector() {
|
||||||
return (rank() == 2 && rows() == 1) && length() > 1 || rank() == 1 && length() > 1;
|
return (rank() == 2 && rows() == 1) && length() > 1 || rank() == 1 && length() > 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Checks whether the matrix is a column vector.
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isColumnVector() {
|
public boolean isColumnVector() {
|
||||||
return rank() == 2 && columns() == 1 && length() > 1;
|
return rank() == 2 && columns() == 1 && length() > 1;
|
||||||
|
@ -5112,12 +4940,6 @@ public abstract class BaseNDArray implements INDArray, Iterable {
|
||||||
return toString(Long.MAX_VALUE, false, -1 * dataType().precision());
|
return toString(Long.MAX_VALUE, false, -1 * dataType().precision());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns a scalar (individual element)
|
|
||||||
* of a scalar ndarray
|
|
||||||
*
|
|
||||||
* @return the individual item in this ndarray
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public Object element() {
|
public Object element() {
|
||||||
|
|
||||||
|
@ -5236,11 +5058,6 @@ public abstract class BaseNDArray implements INDArray, Iterable {
|
||||||
return new FirstAxisIterator(this);
|
return new FirstAxisIterator(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns the start of where the ndarray is for the original data buffer
|
|
||||||
*
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public long originalOffset() {
|
public long originalOffset() {
|
||||||
if (data().originalOffset() >= Integer.MAX_VALUE)
|
if (data().originalOffset() >= Integer.MAX_VALUE)
|
||||||
|
@ -5294,24 +5111,11 @@ public abstract class BaseNDArray implements INDArray, Iterable {
|
||||||
data().read(s, headerData.getLeft(), headerData.getMiddle(), headerData.getRight());
|
data().read(s, headerData.getLeft(), headerData.getMiddle(), headerData.getRight());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* This method returns index of highest value along specified dimension(s)
|
|
||||||
*
|
|
||||||
* @param dimension
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public INDArray argMax(int... dimension) {
|
public INDArray argMax(int... dimension) {
|
||||||
return Nd4j.argMax(this, dimension);
|
return Nd4j.argMax(this, dimension);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* This method returns True, if this INDArray instance is attached to some Workspace. False otherwise.
|
|
||||||
*
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isAttached() {
|
public boolean isAttached() {
|
||||||
if (isEmpty())
|
if (isEmpty())
|
||||||
|
@ -5324,13 +5128,6 @@ public abstract class BaseNDArray implements INDArray, Iterable {
|
||||||
(data.originalDataBuffer() != null && data.originalDataBuffer().isAttached());
|
(data.originalDataBuffer() != null && data.originalDataBuffer().isAttached());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* This method checks, if given attached INDArray is still in scope of its parent Workspace
|
|
||||||
* <p>
|
|
||||||
* PLEASE NOTE: if this INDArray isn't attached to any Workspace, this method will return true
|
|
||||||
*
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isInScope() {
|
public boolean isInScope() {
|
||||||
if (!isAttached())
|
if (!isAttached())
|
||||||
|
@ -5339,13 +5136,6 @@ public abstract class BaseNDArray implements INDArray, Iterable {
|
||||||
return data.isInScope();
|
return data.isInScope();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* This metod detaches INDArray from Workspace, returning copy. Basically it's dup() into new memory chunk.
|
|
||||||
* <p>
|
|
||||||
* PLEASE NOTE: If this INDArray instance is NOT attached - it will be returned unmodified.
|
|
||||||
*
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public INDArray detach() {
|
public INDArray detach() {
|
||||||
if (!isAttached())
|
if (!isAttached())
|
||||||
|
@ -5402,14 +5192,6 @@ public abstract class BaseNDArray implements INDArray, Iterable {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* This method detaches INDArray from current Workspace, and attaches it to Workspace above, if any.
|
|
||||||
* <p>
|
|
||||||
* PLEASE NOTE: If this INDArray instance is NOT attached - it will be returned unmodified.
|
|
||||||
* PLEASE NOTE: If current Workspace is the top-tier one, effect will be equal to detach() call - detached copy will be returned
|
|
||||||
*
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public INDArray leverage() {
|
public INDArray leverage() {
|
||||||
WorkspaceUtils.assertValidArray(this, "Cannot leverage INDArray to new workspace");
|
WorkspaceUtils.assertValidArray(this, "Cannot leverage INDArray to new workspace");
|
||||||
|
@ -5453,33 +5235,11 @@ public abstract class BaseNDArray implements INDArray, Iterable {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* This method detaches INDArray from current Workspace, and attaches it to Workspace with a given Id
|
|
||||||
*
|
|
||||||
* PLEASE NOTE: If this INDArray instance is NOT attached - it will be returned unmodified.
|
|
||||||
* PLEASE NOTE: If Workspace with target Id wasn't created before - this array will be returned unmodified.
|
|
||||||
* PLEASE NOTE: If target workspace is the current one - this array will be returned unmodified.
|
|
||||||
*
|
|
||||||
* @param id
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public INDArray leverageTo(String id) {
|
public INDArray leverageTo(String id) {
|
||||||
return leverageTo(id, false);
|
return leverageTo(id, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* This method detaches INDArray from current Workspace, and attaches it to Workspace with a given Id.
|
|
||||||
* If enforceExistence == true, and no workspace with the specified ID exists, then an {@link Nd4jNoSuchWorkspaceException}
|
|
||||||
* is thrown. Otherwise, if enforceExistance == false and no workspace with the specified ID exists, then the current
|
|
||||||
* INDArray is returned unmodified (same as {@link #leverage()}
|
|
||||||
*
|
|
||||||
* @param id ID of the workspace to leverage to
|
|
||||||
* @param enforceExistence If true, and the specified workspace does not exist: an {@link Nd4jNoSuchWorkspaceException}
|
|
||||||
* will be thrown.
|
|
||||||
* @return The INDArray, leveraged to the specified workspace
|
|
||||||
* @see #leverageTo(String)
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public INDArray leverageTo(String id, boolean enforceExistence) throws Nd4jNoSuchWorkspaceException {
|
public INDArray leverageTo(String id, boolean enforceExistence) throws Nd4jNoSuchWorkspaceException {
|
||||||
WorkspaceUtils.assertValidArray(this, "Cannot leverage INDArray to new workspace");
|
WorkspaceUtils.assertValidArray(this, "Cannot leverage INDArray to new workspace");
|
||||||
|
@ -5518,16 +5278,6 @@ public abstract class BaseNDArray implements INDArray, Iterable {
|
||||||
return copy;
|
return copy;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* 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.
|
|
||||||
*
|
|
||||||
* If the workspace does not exist, or is not active, the array is detached from any workspaces.
|
|
||||||
*
|
|
||||||
* @param id ID of the workspace to leverage to
|
|
||||||
* @return The INDArray, leveraged to the specified workspace (if it exists and is active) otherwise the detached array
|
|
||||||
* @see #leverageTo(String)
|
|
||||||
*/
|
|
||||||
public INDArray leverageOrDetach(String id){
|
public INDArray leverageOrDetach(String id){
|
||||||
if(!isAttached()){
|
if(!isAttached()){
|
||||||
return this;
|
return this;
|
||||||
|
@ -5539,30 +5289,11 @@ public abstract class BaseNDArray implements INDArray, Iterable {
|
||||||
return leverageTo(id);
|
return leverageTo(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* This method pulls this INDArray into current Workspace.
|
|
||||||
*
|
|
||||||
* PLEASE NOTE: If there's no current Workspace - INDArray returned as is
|
|
||||||
*
|
|
||||||
* @return Migrated INDArray or <i>this</i> if no current workspace
|
|
||||||
* @see #migrate(boolean)
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public INDArray migrate() {
|
public INDArray migrate() {
|
||||||
return migrate(false);
|
return migrate(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* This method pulls this INDArray into current Workspace, or optionally detaches if no workspace is present.<br>
|
|
||||||
* That is:<br>
|
|
||||||
* If current workspace is present/active, INDArray is migrated to it.<br>
|
|
||||||
* If no current workspace is present/active, one of two things occur:
|
|
||||||
* 1. If detachOnNoWs arg is true: if there is no current workspace, INDArray is detached
|
|
||||||
* 2. If detachOnNoWs arg is false: this INDArray is returned as-is (no-op) - equivalent to {@link #migrate()}
|
|
||||||
*
|
|
||||||
* @param detachOnNoWs If true: detach on no WS. If false and no workspace: return this.
|
|
||||||
* @return Migrated INDArray
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public INDArray migrate(boolean detachOnNoWs){
|
public INDArray migrate(boolean detachOnNoWs){
|
||||||
WorkspaceUtils.assertValidArray(this, "Cannot leverage INDArray to new workspace");
|
WorkspaceUtils.assertValidArray(this, "Cannot leverage INDArray to new workspace");
|
||||||
|
@ -5778,17 +5509,11 @@ public abstract class BaseNDArray implements INDArray, Iterable {
|
||||||
throw new IllegalStateException("Unknown dataType: [" + type + "]");
|
throw new IllegalStateException("Unknown dataType: [" + type + "]");
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* This method returns true if this INDArray is special case: no-value INDArray
|
|
||||||
*
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isEmpty() {
|
public boolean isEmpty() {
|
||||||
return Shape.isEmpty(jvmShapeInfo.javaShapeInformation);
|
return Shape.isEmpty(jvmShapeInfo.javaShapeInformation);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public long[] shapeInfoJava() {
|
public long[] shapeInfoJava() {
|
||||||
return jvmShapeInfo.javaShapeInformation;
|
return jvmShapeInfo.javaShapeInformation;
|
||||||
|
@ -5880,8 +5605,6 @@ public abstract class BaseNDArray implements INDArray, Iterable {
|
||||||
throw new IllegalStateException("Cannot perform operation " + opName + " on empty array with datatype " + dataType());
|
throw new IllegalStateException("Cannot perform operation " + opName + " on empty array with datatype " + dataType());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean closeable() {
|
public boolean closeable() {
|
||||||
if (released || isAttached())
|
if (released || isAttached())
|
||||||
|
|
|
@ -1296,7 +1296,7 @@ public abstract class BaseSparseNDArray implements ISparseNDArray {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public float getFloat(long[] indices) {
|
public float getFloat(long... indices) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1321,7 +1321,7 @@ public abstract class BaseSparseNDArray implements ISparseNDArray {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public float getFloat(int[] indices) {
|
public float getFloat(int... indices) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1514,23 +1514,16 @@ public abstract class BaseSparseNDArray implements ISparseNDArray {
|
||||||
return isMatrix() && rows() == columns();
|
return isMatrix() && rows() == columns();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Checks whether the matrix is a row vector.
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isRowVector() {
|
public boolean isRowVector() {
|
||||||
return rank == 2 && rows == 1;
|
return rank == 2 && rows == 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Checks whether the matrix is a column vector.
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isColumnVector() {
|
public boolean isColumnVector() {
|
||||||
return rank == 2 && columns == 1;
|
return rank == 2 && columns == 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isMatrix() {
|
public boolean isMatrix() {
|
||||||
if (isMatrix != null)
|
if (isMatrix != null)
|
||||||
|
|
|
@ -683,12 +683,12 @@ public class BaseSparseNDArrayCOO extends BaseSparseNDArray {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public float getFloat(int[] indices) {
|
public float getFloat(int... indices) {
|
||||||
return (float) getDouble(indices);
|
return (float) getDouble(indices);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public float getFloat(long[] indices) {
|
public float getFloat(long... indices) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -860,11 +860,6 @@ public class BaseSparseNDArrayCOO extends BaseSparseNDArray {
|
||||||
return Nd4j.createBuffer(Doubles.toArray(val));
|
return Nd4j.createBuffer(Doubles.toArray(val));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns the indices of non-zero element of the vector
|
|
||||||
*
|
|
||||||
* @return indices in Databuffer
|
|
||||||
* */
|
|
||||||
@Override
|
@Override
|
||||||
public DataBuffer getVectorCoordinates() {
|
public DataBuffer getVectorCoordinates() {
|
||||||
int idx;
|
int idx;
|
||||||
|
@ -884,10 +879,6 @@ public class BaseSparseNDArrayCOO extends BaseSparseNDArray {
|
||||||
return Nd4j.createBuffer(temp);
|
return Nd4j.createBuffer(temp);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Converts the sparse ndarray into a dense one
|
|
||||||
* @return a dense ndarray
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public INDArray toDense() {
|
public INDArray toDense() {
|
||||||
// TODO support view conversion
|
// TODO support view conversion
|
||||||
|
@ -1131,11 +1122,6 @@ public class BaseSparseNDArrayCOO extends BaseSparseNDArray {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* This method returns true if this INDArray is special case: no-value INDArray
|
|
||||||
*
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isEmpty() {
|
public boolean isEmpty() {
|
||||||
return false;
|
return false;
|
||||||
|
|
|
@ -1912,6 +1912,9 @@ public interface INDArray extends Serializable, AutoCloseable {
|
||||||
*/
|
*/
|
||||||
INDArray getScalar(int... indices);
|
INDArray getScalar(int... indices);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* See {@link #getScalar(int[])}
|
||||||
|
*/
|
||||||
INDArray getScalar(long... indices);
|
INDArray getScalar(long... indices);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1921,12 +1924,32 @@ public interface INDArray extends Serializable, AutoCloseable {
|
||||||
*/
|
*/
|
||||||
int getInt(int... indices);
|
int getInt(int... indices);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get a long value at the specified index.
|
||||||
|
* @param index Index to get the integer at.
|
||||||
|
* @return long value at the specified index
|
||||||
|
*/
|
||||||
long getLong(long index);
|
long getLong(long index);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get a long value at the specified indices.
|
||||||
|
* @param indices Indices to get the double at. Number of indices must match the array rank.
|
||||||
|
* @return long value at the specified index
|
||||||
|
*/
|
||||||
long getLong(long... indices);
|
long getLong(long... indices);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the numeric value at the specified index.
|
||||||
|
* @param index index to retreive.
|
||||||
|
* @return numeric value at the specified index.
|
||||||
|
*/
|
||||||
Number getNumber(long index);
|
Number getNumber(long index);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get a numeric value at the specified indices.
|
||||||
|
* @param indices Indices to get the value from. Number of indices must match the array rank.
|
||||||
|
* @return Numeric value at the specified index
|
||||||
|
*/
|
||||||
Number getNumber(long... indices);
|
Number getNumber(long... indices);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1936,6 +1959,9 @@ public interface INDArray extends Serializable, AutoCloseable {
|
||||||
*/
|
*/
|
||||||
double getDouble(int... indices);
|
double getDouble(int... indices);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* See {@link #getDouble(int[])}
|
||||||
|
*/
|
||||||
double getDouble(long... indices);
|
double getDouble(long... indices);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1944,10 +1970,12 @@ public interface INDArray extends Serializable, AutoCloseable {
|
||||||
* @param indices the indices to getScalar
|
* @param indices the indices to getScalar
|
||||||
* @return the array with the specified elements
|
* @return the array with the specified elements
|
||||||
*/
|
*/
|
||||||
float getFloat(int[] indices);
|
float getFloat(int... indices);
|
||||||
|
|
||||||
float getFloat(long[] indices);
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* See {@link #getFloat(int...)}
|
||||||
|
*/
|
||||||
|
float getFloat(long... indices);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the double value at the specified linear index in the array
|
* Get the double value at the specified linear index in the array
|
||||||
|
@ -1962,7 +1990,7 @@ public interface INDArray extends Serializable, AutoCloseable {
|
||||||
*
|
*
|
||||||
* @param i Dimension 0 (row) index
|
* @param i Dimension 0 (row) index
|
||||||
* @param j Dimension 1 (column) index
|
* @param j Dimension 1 (column) index
|
||||||
* @return
|
* @return double value at the specified indices
|
||||||
*/
|
*/
|
||||||
double getDouble(long i, long j);
|
double getDouble(long i, long j);
|
||||||
|
|
||||||
|
@ -1984,7 +2012,6 @@ public interface INDArray extends Serializable, AutoCloseable {
|
||||||
*/
|
*/
|
||||||
float getFloat(long i, long j);
|
float getFloat(long i, long j);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns a copy of this ndarray
|
* Returns a copy of this ndarray
|
||||||
*
|
*
|
||||||
|
@ -2007,7 +2034,6 @@ public interface INDArray extends Serializable, AutoCloseable {
|
||||||
*/
|
*/
|
||||||
INDArray ravel();
|
INDArray ravel();
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns a flattened version (row vector) of this ndarray
|
* Returns a flattened version (row vector) of this ndarray
|
||||||
*
|
*
|
||||||
|
@ -2015,10 +2041,9 @@ public interface INDArray extends Serializable, AutoCloseable {
|
||||||
*/
|
*/
|
||||||
INDArray ravel(char order);
|
INDArray ravel(char order);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
* Set the data for this ndarray.
|
||||||
* @param data
|
* @param data new value for the ndarray data.
|
||||||
*/
|
*/
|
||||||
void setData(DataBuffer data);
|
void setData(DataBuffer data);
|
||||||
|
|
||||||
|
@ -2046,15 +2071,15 @@ public interface INDArray extends Serializable, AutoCloseable {
|
||||||
int getLeadingOnes();
|
int getLeadingOnes();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the specified slice of this ndarray
|
* Returns the slice of this from the specified dimension
|
||||||
*
|
*
|
||||||
* @param i the index of the slice to return
|
* @param i the index of the slice to return
|
||||||
* @param dimension the dimension to return the slice for
|
* @param dimension the dimension of the slice to return
|
||||||
* @return the specified slice of this ndarray
|
* @return the slice of this matrix from the specified dimension
|
||||||
|
* and dimension
|
||||||
*/
|
*/
|
||||||
INDArray slice(long i, int dimension);
|
INDArray slice(long i, int dimension);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the specified slice of this ndarray
|
* Returns the specified slice of this ndarray
|
||||||
*
|
*
|
||||||
|
@ -2063,23 +2088,21 @@ public interface INDArray extends Serializable, AutoCloseable {
|
||||||
*/
|
*/
|
||||||
INDArray slice(long i);
|
INDArray slice(long i);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the start of where the ndarray is
|
* Returns the start of where the ndarray is for the underlying data
|
||||||
* for the underlying data
|
|
||||||
*
|
*
|
||||||
* @return the starting offset
|
* @return the starting offset
|
||||||
*/
|
*/
|
||||||
long offset();
|
long offset();
|
||||||
|
|
||||||
|
// TODO: Unused untested method.
|
||||||
/**
|
/**
|
||||||
* Returns the start of where the ndarray is for the original data buffer
|
* Returns the start of where the ndarray is for the original data buffer
|
||||||
* @return
|
*
|
||||||
|
* @return original offset.
|
||||||
*/
|
*/
|
||||||
long originalOffset();
|
long originalOffset();
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Reshapes the ndarray (can't change the length of the ndarray). Typically this will be a view, unless reshaping
|
* Reshapes the ndarray (can't change the length of the ndarray). Typically this will be a view, unless reshaping
|
||||||
* without copying is impossible.
|
* without copying is impossible.
|
||||||
|
@ -2110,7 +2133,6 @@ public interface INDArray extends Serializable, AutoCloseable {
|
||||||
*/
|
*/
|
||||||
INDArray reshape(char order, boolean enforceView, long... newShape);
|
INDArray reshape(char order, boolean enforceView, long... newShape);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Reshapes the ndarray (can't change the length of the ndarray). Typically this will be a view, unless reshaping
|
* Reshapes the ndarray (can't change the length of the ndarray). Typically this will be a view, unless reshaping
|
||||||
* without copying is impossible.
|
* without copying is impossible.
|
||||||
|
@ -2121,7 +2143,6 @@ public interface INDArray extends Serializable, AutoCloseable {
|
||||||
*/
|
*/
|
||||||
INDArray reshape(char order, int rows, int columns);
|
INDArray reshape(char order, int rows, int columns);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Reshapes the ndarray (can't change the length of the ndarray). Typically this will be a view, unless reshaping
|
* Reshapes the ndarray (can't change the length of the ndarray). Typically this will be a view, unless reshaping
|
||||||
* without copying is impossible.
|
* without copying is impossible.
|
||||||
|
@ -2131,6 +2152,9 @@ public interface INDArray extends Serializable, AutoCloseable {
|
||||||
*/
|
*/
|
||||||
INDArray reshape(long... newShape);
|
INDArray reshape(long... newShape);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* See {@link #reshape(long[])}
|
||||||
|
*/
|
||||||
INDArray reshape(int[] shape);
|
INDArray reshape(int[] shape);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -2150,7 +2174,6 @@ public interface INDArray extends Serializable, AutoCloseable {
|
||||||
*/
|
*/
|
||||||
INDArray transpose();
|
INDArray transpose();
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Flip the rows and columns of a matrix, in-place
|
* Flip the rows and columns of a matrix, in-place
|
||||||
*
|
*
|
||||||
|
@ -2216,8 +2239,11 @@ public interface INDArray extends Serializable, AutoCloseable {
|
||||||
* @return the newly permuted array
|
* @return the newly permuted array
|
||||||
*/
|
*/
|
||||||
INDArray dimShuffle(Object[] rearrange, int[] newOrder, boolean[] broadCastable);
|
INDArray dimShuffle(Object[] rearrange, int[] newOrder, boolean[] broadCastable);
|
||||||
INDArray dimShuffle(Object[] rearrange, long[] newOrder, boolean[] broadCastable);
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* See {@link #dimShuffle(Object[], int[], boolean[])
|
||||||
|
*/
|
||||||
|
INDArray dimShuffle(Object[] rearrange, long[] newOrder, boolean[] broadCastable);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the specified column.
|
* Returns the specified column.
|
||||||
|
@ -2336,7 +2362,6 @@ public interface INDArray extends Serializable, AutoCloseable {
|
||||||
*/
|
*/
|
||||||
boolean isScalar();
|
boolean isScalar();
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the shape of this ndarray
|
* Returns the shape of this ndarray
|
||||||
*
|
*
|
||||||
|
@ -2346,7 +2371,7 @@ public interface INDArray extends Serializable, AutoCloseable {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns shape descriptor of this ndarray
|
* Returns shape descriptor of this ndarray
|
||||||
* @return
|
* @return shape descriptor
|
||||||
*/
|
*/
|
||||||
LongShapeDescriptor shapeDescriptor();
|
LongShapeDescriptor shapeDescriptor();
|
||||||
|
|
||||||
|
@ -2386,7 +2411,6 @@ public interface INDArray extends Serializable, AutoCloseable {
|
||||||
*/
|
*/
|
||||||
INDArray broadcast(long... shape);
|
INDArray broadcast(long... shape);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Broadcasts this ndarray to be the specified shape
|
* Broadcasts this ndarray to be the specified shape
|
||||||
*
|
*
|
||||||
|
@ -2394,7 +2418,6 @@ public interface INDArray extends Serializable, AutoCloseable {
|
||||||
*/
|
*/
|
||||||
INDArray broadcast(INDArray result);
|
INDArray broadcast(INDArray result);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns a scalar (individual element)
|
* Returns a scalar (individual element)
|
||||||
* of a scalar ndarray
|
* of a scalar ndarray
|
||||||
|
@ -2413,9 +2436,9 @@ public interface INDArray extends Serializable, AutoCloseable {
|
||||||
/**
|
/**
|
||||||
* This method checks 2 INDArrays equality with given eps
|
* This method checks 2 INDArrays equality with given eps
|
||||||
*
|
*
|
||||||
* @param o
|
* @param o INDArray to compare against.
|
||||||
* @param eps Epsilon value to use for the quality operation
|
* @param eps Epsilon value to use for the quality operation
|
||||||
* @return
|
* @return True if ndarrays are equal within eps.
|
||||||
*/
|
*/
|
||||||
boolean equalsWithEps(Object o, double eps);
|
boolean equalsWithEps(Object o, double eps);
|
||||||
|
|
||||||
|
@ -2448,7 +2471,7 @@ public interface INDArray extends Serializable, AutoCloseable {
|
||||||
/**
|
/**
|
||||||
* Remainder operator
|
* Remainder operator
|
||||||
* @param denominator the denominator
|
* @param denominator the denominator
|
||||||
* @return
|
* @return remainder
|
||||||
*/
|
*/
|
||||||
INDArray remainder(INDArray denominator);
|
INDArray remainder(INDArray denominator);
|
||||||
|
|
||||||
|
@ -2456,75 +2479,86 @@ public interface INDArray extends Serializable, AutoCloseable {
|
||||||
* Remainder operator
|
* Remainder operator
|
||||||
* @param denominator the denominator
|
* @param denominator the denominator
|
||||||
* @param result the result array to put this in
|
* @param result the result array to put this in
|
||||||
* @return
|
* @return Remainder
|
||||||
*/
|
*/
|
||||||
INDArray remainder(INDArray denominator, INDArray result);
|
INDArray remainder(INDArray denominator, INDArray result);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The scalar denominator
|
* The scalar remainder
|
||||||
* @param denominator the denominator as a scalar
|
* @param denominator the denominator as a scalar
|
||||||
* @return
|
* @return Remainder
|
||||||
*/
|
*/
|
||||||
INDArray remainder(Number denominator);
|
INDArray remainder(Number denominator);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
* The scalar remainder
|
||||||
* @param denominator
|
* @param denominator the denominator as a scalar
|
||||||
* @param result
|
* @param result the result array to put this in
|
||||||
* @return
|
* @return Remainder
|
||||||
*/
|
*/
|
||||||
INDArray remainder(Number denominator, INDArray result);
|
INDArray remainder(Number denominator, INDArray result);
|
||||||
|
|
||||||
|
// TODO: Unused untested method.
|
||||||
/**
|
/**
|
||||||
* In place remainder
|
* In place remainder
|
||||||
* @param denominator
|
* @param denominator the denominator
|
||||||
* @return
|
* @return Remainder
|
||||||
*/
|
*/
|
||||||
INDArray remainderi(INDArray denominator);
|
INDArray remainderi(INDArray denominator);
|
||||||
|
|
||||||
|
// TODO: Unused untested method.
|
||||||
/**
|
/**
|
||||||
* In place remainder
|
* In place remainder
|
||||||
* @param denominator
|
* @param denominator the denominator
|
||||||
* @return
|
* @return Remainder
|
||||||
*/
|
*/
|
||||||
INDArray remainderi(Number denominator);
|
INDArray remainderi(Number denominator);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* remainder of division
|
* remainder of division
|
||||||
* @param denominator the array of denominators for each element
|
* @param denominator the array of denominators for each element in this array
|
||||||
* in this array
|
* @return array of remainders
|
||||||
* @return
|
|
||||||
*/
|
*/
|
||||||
INDArray fmod(INDArray denominator);
|
INDArray fmod(INDArray denominator);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* remainder of division
|
* remainder of division
|
||||||
* @param denominator the
|
* @param denominator the array of denominators for each element in this array
|
||||||
* @param result the result array
|
* @param result the result array
|
||||||
* @return
|
* @return array of remainders
|
||||||
*/
|
*/
|
||||||
INDArray fmod(INDArray denominator, INDArray result);
|
INDArray fmod(INDArray denominator, INDArray result);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* remainder of division by scalar.
|
||||||
*
|
*
|
||||||
* @param denominator
|
* @param denominator the denominator
|
||||||
* @return
|
* @return array of remainders
|
||||||
*/
|
*/
|
||||||
INDArray fmod(Number denominator);
|
INDArray fmod(Number denominator);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* remainder of division by scalar.
|
||||||
|
*
|
||||||
|
* @param denominator the denominator
|
||||||
|
* @param result the result array
|
||||||
|
* @return array of remainders
|
||||||
|
*/
|
||||||
INDArray fmod(Number denominator, INDArray result);
|
INDArray fmod(Number denominator, INDArray result);
|
||||||
|
|
||||||
|
// TODO: Unused untested method.
|
||||||
/**
|
/**
|
||||||
* In place fmod
|
* In place fmod
|
||||||
* @param denominator
|
* @param denominator the array of denominators for each element in this array
|
||||||
* @return
|
* @return array of remainders
|
||||||
*/
|
*/
|
||||||
INDArray fmodi(INDArray denominator);
|
INDArray fmodi(INDArray denominator);
|
||||||
|
|
||||||
|
// TODO: Unused untested method.
|
||||||
/**
|
/**
|
||||||
* In place fmod
|
* In place fmod
|
||||||
* @param denominator
|
* @param denominator the denominator as a scalar
|
||||||
* @return
|
* @return array of remainders
|
||||||
*/
|
*/
|
||||||
INDArray fmodi(Number denominator);
|
INDArray fmodi(Number denominator);
|
||||||
|
|
||||||
|
@ -2546,7 +2580,7 @@ public interface INDArray extends Serializable, AutoCloseable {
|
||||||
* This method checks, if given attached INDArray is still in scope of its parent Workspace
|
* 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
|
* PLEASE NOTE: if this INDArray isn't attached to any Workspace, this method will return true
|
||||||
* @return
|
* @return true if attached to workspace.
|
||||||
*/
|
*/
|
||||||
boolean isInScope();
|
boolean isInScope();
|
||||||
|
|
||||||
|
@ -2563,12 +2597,11 @@ public interface INDArray extends Serializable, AutoCloseable {
|
||||||
/**
|
/**
|
||||||
* This method detaches INDArray from current Workspace, and attaches it to Workspace above, if any.
|
* This method detaches INDArray from current Workspace, and attaches it to Workspace above, if any.
|
||||||
*
|
*
|
||||||
* PLEASE NOTE: If this INDArray instance is
|
* PLEASE NOTE: If this INDArray instance is NOT attached - it will be returned unmodified.
|
||||||
* NOT attached - it will be returned unmodified.
|
|
||||||
* PLEASE NOTE: If current Workspace is the top-tier one,
|
* PLEASE NOTE: If current Workspace is the top-tier one,
|
||||||
* effect will be equal to detach() call - detached copy will be returned
|
* effect will be equal to detach() call - detached copy will be returned
|
||||||
*
|
*
|
||||||
* @return
|
* @return this ndarray or a detached copy.
|
||||||
*/
|
*/
|
||||||
INDArray leverage();
|
INDArray leverage();
|
||||||
|
|
||||||
|
@ -2576,8 +2609,6 @@ public interface INDArray extends Serializable, AutoCloseable {
|
||||||
* This method detaches INDArray from current Workspace, and attaches it to Workspace with a given Id - if a workspace
|
* This method detaches INDArray from current Workspace, and attaches it to Workspace with a given Id - if a workspace
|
||||||
* with that ID exists. If no workspace with the specified ID exists, the current INDArray is returned unmodified.
|
* with that ID exists. If no workspace with the specified ID exists, the current INDArray is returned unmodified.
|
||||||
*
|
*
|
||||||
* @param id ID of the workspace to leverage to
|
|
||||||
* @return
|
|
||||||
* @see #leverageTo(String, boolean)
|
* @see #leverageTo(String, boolean)
|
||||||
*/
|
*/
|
||||||
INDArray leverageTo(String id);
|
INDArray leverageTo(String id);
|
||||||
|
@ -2635,7 +2666,7 @@ public interface INDArray extends Serializable, AutoCloseable {
|
||||||
* This method returns percentile value for this INDArray
|
* This method returns percentile value for this INDArray
|
||||||
*
|
*
|
||||||
* @param percentile target percentile in range of 0..100
|
* @param percentile target percentile in range of 0..100
|
||||||
* @return
|
* @return percentile value
|
||||||
*/
|
*/
|
||||||
Number percentileNumber(Number percentile);
|
Number percentileNumber(Number percentile);
|
||||||
|
|
||||||
|
@ -2648,29 +2679,28 @@ public interface INDArray extends Serializable, AutoCloseable {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This method returns median along given dimension(s)
|
* This method returns median along given dimension(s)
|
||||||
* @param dimension
|
* @param dimension Dimension to calculate median
|
||||||
* @return Median along specified dimensions
|
* @return Median along specified dimensions
|
||||||
*/
|
*/
|
||||||
INDArray median(int... dimension);
|
INDArray median(int... dimension);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This method returns median along given dimension(s)
|
* This method returns percentile along given dimension(s)
|
||||||
* @param percentile target percentile in range of 0..100
|
* @param percentile target percentile in range of 0..100
|
||||||
* @param dimension Dimension to calculate percentile for
|
* @param dimension Dimension to calculate percentile for
|
||||||
* @return
|
* @return array with percentiles
|
||||||
*/
|
*/
|
||||||
INDArray percentile(Number percentile, int... dimension);
|
INDArray percentile(Number percentile, int... dimension);
|
||||||
|
|
||||||
/**
|
/*
|
||||||
* ------------ Sparse methods ------------
|
* ------------ Sparse methods ------------
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return a array of non-major pointers
|
* Return a array of non-major pointers
|
||||||
* i.e. return the column indexes in case of row-major ndarray
|
* i.e. return the column indexes in case of row-major ndarray
|
||||||
* @return a DataBuffer of indexes
|
* @return a DataBuffer of indexes
|
||||||
* */
|
*/
|
||||||
DataBuffer getVectorCoordinates();
|
DataBuffer getVectorCoordinates();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -2681,7 +2711,7 @@ public interface INDArray extends Serializable, AutoCloseable {
|
||||||
/**
|
/**
|
||||||
* Return the number of non-null element
|
* Return the number of non-null element
|
||||||
* @return nnz
|
* @return nnz
|
||||||
* */
|
*/
|
||||||
int nnz();
|
int nnz();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -2691,15 +2721,18 @@ public interface INDArray extends Serializable, AutoCloseable {
|
||||||
* */
|
* */
|
||||||
SparseFormat getFormat();
|
SparseFormat getFormat();
|
||||||
|
|
||||||
|
//TODO: Undocumented but often used method.
|
||||||
int[] flags();
|
int[] flags();
|
||||||
|
|
||||||
|
//TODO: Undocumented but often used method.
|
||||||
int[] hiddenDimensions();
|
int[] hiddenDimensions();
|
||||||
|
|
||||||
|
//TODO: Undocumented but often used method.
|
||||||
int[] sparseOffsets();
|
int[] sparseOffsets();
|
||||||
|
|
||||||
|
//TODO: Undocumented but often used method.
|
||||||
int underlyingRank();
|
int underlyingRank();
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Add an {@link INDArray}
|
* Add an {@link INDArray}
|
||||||
* to flatbuffers builder
|
* to flatbuffers builder
|
||||||
|
@ -2710,19 +2743,19 @@ public interface INDArray extends Serializable, AutoCloseable {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This method returns true if this INDArray is special case: no-value INDArray
|
* This method returns true if this INDArray is special case: no-value INDArray
|
||||||
* @return
|
* @return True if empty.
|
||||||
*/
|
*/
|
||||||
boolean isEmpty();
|
boolean isEmpty();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This method returns shapeInformation as jvm long array
|
* This method returns shapeInformation as jvm long array
|
||||||
* @return
|
* @return shapeInformation
|
||||||
*/
|
*/
|
||||||
long[] shapeInfoJava();
|
long[] shapeInfoJava();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This method returns dtype for this INDArray
|
* This method returns dtype for this INDArray
|
||||||
* @return
|
* @return Datattype
|
||||||
*/
|
*/
|
||||||
DataType dataType();
|
DataType dataType();
|
||||||
|
|
||||||
|
@ -2734,45 +2767,45 @@ public interface INDArray extends Serializable, AutoCloseable {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This method checks if this INDArray instance is one of integer types
|
* This method checks if this INDArray instance is one of integer types
|
||||||
* @return
|
* @return true if integer type
|
||||||
*/
|
*/
|
||||||
boolean isZ();
|
boolean isZ();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This method checks if this INDArray instance has boolean type
|
* This method checks if this INDArray instance has boolean type
|
||||||
* @return
|
* @return true if boolean type.
|
||||||
*/
|
*/
|
||||||
boolean isB();
|
boolean isB();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This method checks if this INDArray instance has String type
|
* This method checks if this INDArray instance has String type
|
||||||
* @return
|
* @return true if string type.
|
||||||
*/
|
*/
|
||||||
boolean isS();
|
boolean isS();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This method cast elements of this INDArray to new data type
|
* This method cast elements of this INDArray to new data type
|
||||||
*
|
*
|
||||||
* @param dataType
|
* @param dataType new datatype.
|
||||||
* @return
|
* @return this if datatype matches, otherwise a new array of specified datatype.
|
||||||
*/
|
*/
|
||||||
INDArray castTo(DataType dataType);
|
INDArray castTo(DataType dataType);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This method checks if all elements within this array are non-zero (or true, in case of boolean)
|
* This method checks if all elements within this array are non-zero (or true, in case of boolean)
|
||||||
* @return
|
* @return true if all non-zero.
|
||||||
*/
|
*/
|
||||||
boolean all();
|
boolean all();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This method checks if any of the elements within this array are non-zero (or true, in case of boolean)
|
* This method checks if any of the elements within this array are non-zero (or true, in case of boolean)
|
||||||
* @return
|
* @return true if any non-zero.
|
||||||
*/
|
*/
|
||||||
boolean any();
|
boolean any();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This method checks if any of the elements within this array are non-zero (or true, in case of boolean)
|
* This method checks if any of the elements within this array are non-zero (or true, in case of boolean)
|
||||||
* @return
|
* @return true if any non-zero
|
||||||
*/
|
*/
|
||||||
boolean none();
|
boolean none();
|
||||||
|
|
||||||
|
@ -2798,35 +2831,29 @@ public interface INDArray extends Serializable, AutoCloseable {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This method returns empty array with the same dtype/order/shape as this one
|
* This method returns empty array with the same dtype/order/shape as this one
|
||||||
* @return
|
* @return empty array with the same dtype/order/shape
|
||||||
*/
|
*/
|
||||||
INDArray like();
|
INDArray like();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This method returns uninitialized array with the same dtype/order/shape as this one
|
* This method returns uninitialized array with the same dtype/order/shape as this one
|
||||||
* @return
|
* @return uninitialized array with the same dtype/order/shape
|
||||||
*/
|
*/
|
||||||
INDArray ulike();
|
INDArray ulike();
|
||||||
|
|
||||||
/**
|
|
||||||
* This method returns array with gains for Barnes-Hut-Tsne algorithm
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
//INDArray[] gains(INDArray input, INDArray gradx, INDArray epsilon);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get a string representation of the array with configurable formatting
|
* Get a string representation of the array with configurable formatting
|
||||||
* @param options format options
|
* @param options format options
|
||||||
*/
|
*/
|
||||||
String toString(@NonNull NDArrayStrings options);
|
String toString(@NonNull NDArrayStrings options);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get a string representation of the array
|
* Get a string representation of the array
|
||||||
*
|
*
|
||||||
* @param maxElements Summarize if more than maxElements in the array
|
* @param maxElements Summarize if more than maxElements in the array
|
||||||
* @param forceSummarize Force a summary instead of a full print
|
* @param forceSummarize Force a summary instead of a full print
|
||||||
* @param precision The number of decimals to print. Doesn't print trailing 0s if negative
|
* @param precision The number of decimals to print. Doesn't print trailing 0s if negative
|
||||||
|
* @return string representation of the array
|
||||||
*/
|
*/
|
||||||
String toString(long maxElements, boolean forceSummarize, int precision);
|
String toString(long maxElements, boolean forceSummarize, int precision);
|
||||||
|
|
||||||
|
|
|
@ -28,28 +28,11 @@ public interface ISparseNDArray extends INDArray {
|
||||||
*
|
*
|
||||||
* */
|
* */
|
||||||
|
|
||||||
/**
|
|
||||||
* Return a array of non-major pointers
|
|
||||||
* i.e. return the column indexes in case of row-major ndarray
|
|
||||||
* @return a DataBuffer of indexes
|
|
||||||
* */
|
|
||||||
DataBuffer getVectorCoordinates();
|
DataBuffer getVectorCoordinates();
|
||||||
|
|
||||||
/**
|
|
||||||
* Return a dense representation of the sparse ndarray
|
|
||||||
* */
|
|
||||||
INDArray toDense();
|
INDArray toDense();
|
||||||
|
|
||||||
/**
|
|
||||||
* Return the number of non-null element
|
|
||||||
* @return nnz
|
|
||||||
* */
|
|
||||||
int nnz();
|
int nnz();
|
||||||
|
|
||||||
/**
|
|
||||||
* Return the sparse format (i.e COO, CSR, ...)
|
|
||||||
* @return format
|
|
||||||
* @see SparseFormat
|
|
||||||
* */
|
|
||||||
SparseFormat getFormat();
|
SparseFormat getFormat();
|
||||||
}
|
}
|
||||||
|
|
|
@ -544,13 +544,6 @@ public class JCublasNDArray extends BaseNDArray {
|
||||||
return LongShapeDescriptor.fromShape(shape(), stride(), elementWiseStride(), ordering(), dataType(), isEmpty());
|
return LongShapeDescriptor.fromShape(shape(), stride(), elementWiseStride(), ordering(), dataType(), isEmpty());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* This method does direct array copy. Impossible to use on views or mixed orders.
|
|
||||||
*
|
|
||||||
* PLEASE NOTE: YOU SHOULD NEVER USE THIS METHOD, UNLESS YOU 100% CLEAR ABOUT IT
|
|
||||||
*
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public INDArray unsafeDuplication() {
|
public INDArray unsafeDuplication() {
|
||||||
return unsafeDuplication(true);
|
return unsafeDuplication(true);
|
||||||
|
@ -717,14 +710,6 @@ public class JCublasNDArray extends BaseNDArray {
|
||||||
return copy;
|
return copy;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* This method pulls this INDArray into current Workspace.
|
|
||||||
*
|
|
||||||
* PLEASE NOTE: If there's no current Workspace - INDArray returned as is
|
|
||||||
*
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public INDArray migrate() {
|
public INDArray migrate() {
|
||||||
WorkspaceUtils.assertValidArray(this, "Cannot leverage INDArray to new workspace");
|
WorkspaceUtils.assertValidArray(this, "Cannot leverage INDArray to new workspace");
|
||||||
|
|
|
@ -114,11 +114,6 @@ public class JcusparseNDArrayCSR extends BaseSparseNDArrayCSR {
|
||||||
throw new UnsupportedOperationException();
|
throw new UnsupportedOperationException();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* This method returns true if this INDArray is special case: no-value INDArray
|
|
||||||
*
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isEmpty() {
|
public boolean isEmpty() {
|
||||||
throw new UnsupportedOperationException();
|
throw new UnsupportedOperationException();
|
||||||
|
|
|
@ -459,13 +459,6 @@ public class NDArray extends BaseNDArray {
|
||||||
return new BaseNDArrayProxy(this);
|
return new BaseNDArrayProxy(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* This method does direct array copy. Impossible to use on views or mixed orders.
|
|
||||||
*
|
|
||||||
* PLEASE NOTE: YOU SHOULD NEVER USE THIS METHOD, UNLESS YOU 100% CLEAR ABOUT IT
|
|
||||||
*
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public INDArray unsafeDuplication() {
|
public INDArray unsafeDuplication() {
|
||||||
WorkspaceUtils.assertValidArray(this, "Cannot duplicate array");
|
WorkspaceUtils.assertValidArray(this, "Cannot duplicate array");
|
||||||
|
|
|
@ -124,11 +124,6 @@ public class SparseNDArrayCSR extends BaseSparseNDArrayCSR {
|
||||||
throw new UnsupportedOperationException();
|
throw new UnsupportedOperationException();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* This method returns true if this INDArray is special case: no-value INDArray
|
|
||||||
*
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isEmpty() {
|
public boolean isEmpty() {
|
||||||
return false;
|
return false;
|
||||||
|
|
Loading…
Reference in New Issue