org.nd4j.linalg.jblas
Class NDArray
- java.lang.Object
-
- org.nd4j.linalg.api.ndarray.BaseNDArray
-
- org.nd4j.linalg.jblas.NDArray
-
- All Implemented Interfaces:
- java.io.Serializable, INDArray
public class NDArray extends BaseNDArray
NDArray: (think numpy) A few things of note. An NDArray can have any number of dimensions. An NDArray is accessed via strides. Strides are how to index over a contiguous block of data. This block of data has 2 orders(as of right now): fortran and c- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor and Description NDArray()NDArray(DataBuffer buffer)NDArray(DataBuffer data, int[] shape)NDArray(DataBuffer data, int[] shape, int[] stride, int offset)NDArray(DataBuffer buffer, int[] shape, int[] stride, int offset, char ordering)NDArray(double[][] data)NDArray(double[] data, int[] shape, int[] stride, int offset)NDArray(DoubleBuffer buffer, int[] shape, int offset)NDArray(org.jblas.DoubleMatrix doubleMatrix)NDArray(float[][] floats)NDArray(float[] data, int[] shape)Create this ndarray with the given data and shape and 0 offsetNDArray(float[] data, int[] shape, char ordering)Create this ndarray with the given data and shape and 0 offsetNDArray(float[] data, int[] shape, int offset)NDArray(float[] data, int[] shape, int[] stride)NDArray(float[] data, int[] shape, int[] stride, char ordering)NDArray(float[] data, int[] shape, int[] stride, int offset)NDArray(float[] data, int[] shape, int[] stride, int offset, char ordering)NDArray(float[] data, int[] shape, int offset, char ordering)NDArray(int[] shape)NDArray(int[] shape, char ordering)NDArray(int[] shape, int offset)NDArray(int[] shape, int[] stride)Create the ndarray with the specified shape and stride and an offset of 0NDArray(int[] shape, int[] stride, char ordering)Create the ndarray with the specified shape and stride and an offset of 0NDArray(int[] shape, int[] stride, int offset)Construct an ndarray of the specified shape with an empty data arrayNDArray(int[] shape, int[] stride, int offset, char ordering)Construct an ndarray of the specified shape with an empty data arrayNDArray(int[] shape, int offset, char ordering)NDArray(int newRows, int newColumns)Creates a new n times m DoubleMatrix.NDArray(int newRows, int newColumns, char ordering)Creates a new n times m DoubleMatrix.NDArray(java.util.List<INDArray> slices, int[] shape)Create an ndarray from the specified slices.NDArray(java.util.List<INDArray> slices, int[] shape, char ordering)Create an ndarray from the specified slices.NDArray(java.util.List<INDArray> slices, int[] shape, int[] stride)Create an ndarray from the specified slices.NDArray(java.util.List<INDArray> slices, int[] shape, int[] stride, char ordering)Create an ndarray from the specified slices.
-
Method Summary
-
Methods inherited from class org.nd4j.linalg.api.ndarray.BaseNDArray
add, add, add, add, add, add, addColumnVector, addi, addi, addi, addi, addi, addi, addiColumnVector, addiRowVector, addRowVector, assign, assign, broadcast, checkDimensions, columns, cond, condi, cumsum, cumsumi, data, dimShuffle, distance1, distance2, div, div, div, div, div, div, divColumnVector, divi, divi, divi, divi, divi, divi, diviColumnVector, diviRowVector, divRowVector, dup, element, endsForSlices, eps, eps, epsi, epsi, eq, eq, eqi, eqi, equals, get, getColumn, getColumns, getDouble, getDouble, getDouble, getElement, getElement, getFloat, getFloat, getFloat, getIndex, getInt, getRow, getRows, getScalar, getScalar, getScalar, gt, gt, gti, gti, index, isColumnVector, isMatrix, isRowVector, isScalar, isVector, iterateOverAllColumns, iterateOverAllRows, iterateOverDimension, length, linearIndex, linearView, linearViewColumnOrder, lt, lt, lti, lti, majorStride, max, mean, min, mmul, mmul, mmuli, mmuli, mul, mul, mul, mul, mul, mul, mulColumnVector, muli, muli, muli, muli, muli, muli, muliColumnVector, muliRowVector, mulRowVector, neg, negi, neq, neqi, norm1, norm2, normmax, offset, ordering, permute, prod, put, put, put, put, put, put, putColumn, putRow, putScalar, putScalar, putScalar, putScalar, putScalar, putScalar, putSlice, ravel, rdiv, rdiv, rdiv, rdiv, rdiv, rdiv, rdivColumnVector, rdivi, rdivi, rdivi, rdivi, rdivi, rdivi, rdiviColumnVector, rdiviRowVector, rdivRowVector, reduce, repmat, reshape, reshape, rows, rsub, rsub, rsub, rsub, rsub, rsub, rsubColumnVector, rsubi, rsubi, rsubi, rsubi, rsubi, rsubi, rsubiColumnVector, rsubiRowVector, rsubRowVector, secondaryStride, setData, setData, setStride, shape, size, slice, slice, slices, sliceVectors, squaredDistance, std, stride, sub, sub, sub, sub, sub, sub, subArray, subColumnVector, subi, subi, subi, subi, subi, subi, subiColumnVector, subiRowVector, subRowVector, sum, swapAxes, toString, transpose, var, vectorAlongDimension, vectorForDimensionAndOffset, vectorsAlongDimension
-
-
-
-
Constructor Detail
-
NDArray
public NDArray()
-
NDArray
public NDArray(DataBuffer buffer)
-
NDArray
public NDArray(DataBuffer buffer, int[] shape, int[] stride, int offset, char ordering)
-
NDArray
public NDArray(double[][] data)
-
NDArray
public NDArray(float[] data, int[] shape, char ordering)Create this ndarray with the given data and shape and 0 offset- Parameters:
data- the data to useshape- the shape of the ndarrayordering-
-
NDArray
public NDArray(float[] data, int[] shape, int offset, char ordering)- Parameters:
data- the data to useshape- the shape of the ndarrayoffset- the desired offsetordering- the ordering of the ndarray
-
NDArray
public NDArray(int[] shape, int[] stride, int offset, char ordering)Construct an ndarray of the specified shape with an empty data array- Parameters:
shape- the shape of the ndarraystride- the stride of the ndarrayoffset- the desired offsetordering- the ordering of the ndarray
-
NDArray
public NDArray(int[] shape, int[] stride, char ordering)Create the ndarray with the specified shape and stride and an offset of 0- Parameters:
shape- the shape of the ndarraystride- the stride of the ndarrayordering- the ordering of the ndarray
-
NDArray
public NDArray(int[] shape, int offset, char ordering)
-
NDArray
public NDArray(int[] shape)
-
NDArray
public NDArray(int newRows, int newColumns, char ordering)Creates a new n times m DoubleMatrix.- Parameters:
newRows- the number of rows (n) of the new matrix.newColumns- the number of columns (m) of the new matrix.ordering-
-
NDArray
public NDArray(java.util.List<INDArray> slices, int[] shape, char ordering)
Create an ndarray from the specified slices. This will go through and merge all of the data from each slice in to one ndarray which will then take the specified shape- Parameters:
slices- the slices to mergeshape- the shape of the ndarrayordering-
-
NDArray
public NDArray(java.util.List<INDArray> slices, int[] shape, int[] stride, char ordering)
Create an ndarray from the specified slices. This will go through and merge all of the data from each slice in to one ndarray which will then take the specified shape- Parameters:
slices- the slices to mergeshape- the shape of the ndarraystride-ordering-
-
NDArray
public NDArray(float[] data, int[] shape, int[] stride, char ordering)
-
NDArray
public NDArray(float[] data, int[] shape, int[] stride, int offset, char ordering)
-
NDArray
public NDArray(float[] data, int[] shape)Create this ndarray with the given data and shape and 0 offset- Parameters:
data- the data to useshape- the shape of the ndarray
-
NDArray
public NDArray(float[] data, int[] shape, int offset)
-
NDArray
public NDArray(int[] shape, int[] stride, int offset)Construct an ndarray of the specified shape with an empty data array- Parameters:
shape- the shape of the ndarraystride- the stride of the ndarrayoffset- the desired offset
-
NDArray
public NDArray(int[] shape, int[] stride)Create the ndarray with the specified shape and stride and an offset of 0- Parameters:
shape- the shape of the ndarraystride- the stride of the ndarray
-
NDArray
public NDArray(int[] shape, int offset)
-
NDArray
public NDArray(int[] shape, char ordering)
-
NDArray
public NDArray(int newRows, int newColumns)Creates a new n times m DoubleMatrix.- Parameters:
newRows- the number of rows (n) of the new matrix.newColumns- the number of columns (m) of the new matrix.
-
NDArray
public NDArray(java.util.List<INDArray> slices, int[] shape)
Create an ndarray from the specified slices. This will go through and merge all of the data from each slice in to one ndarray which will then take the specified shape- Parameters:
slices- the slices to mergeshape- the shape of the ndarray
-
NDArray
public NDArray(java.util.List<INDArray> slices, int[] shape, int[] stride)
Create an ndarray from the specified slices. This will go through and merge all of the data from each slice in to one ndarray which will then take the specified shape- Parameters:
slices- the slices to mergeshape- the shape of the ndarraystride-
-
NDArray
public NDArray(float[] data, int[] shape, int[] stride)
-
NDArray
public NDArray(float[] data, int[] shape, int[] stride, int offset)
-
NDArray
public NDArray(org.jblas.DoubleMatrix doubleMatrix)
-
NDArray
public NDArray(double[] data, int[] shape, int[] stride, int offset)
-
NDArray
public NDArray(float[][] floats)
-
NDArray
public NDArray(DataBuffer data, int[] shape, int[] stride, int offset)
-
NDArray
public NDArray(DataBuffer data, int[] shape)
-
NDArray
public NDArray(DoubleBuffer buffer, int[] shape, int offset)
-
-
DMelt 3.0 © DataMelt by jWork.ORG