use of org.nd4j.linalg.api.complex.IComplexNDArray in project nd4j by deeplearning4j.
the class Nd4j method createComplex.
/**
* Creates an ndarray with the specified data
*
* @param data the number of columns in the row vector
* @return ndarray
*/
public static IComplexNDArray createComplex(double[] data, char order) {
IComplexNDArray ret = INSTANCE.createComplex(data, Nd4j.getComplexStrides(new int[] { 1, data.length }, order), 0, order);
logCreationIfNecessary(ret);
return ret;
}
use of org.nd4j.linalg.api.complex.IComplexNDArray in project nd4j by deeplearning4j.
the class Nd4j method createComplex.
/**
* Create a complex ndarray from the passed in indarray
*
* @param arr the arr to wrap
* @return the complex ndarray with the specified ndarray as the
* real components
*/
public static IComplexNDArray createComplex(INDArray arr) {
if (arr instanceof IComplexNDArray)
return (IComplexNDArray) arr;
IComplexNDArray ret = INSTANCE.createComplex(arr);
logCreationIfNecessary(ret);
return ret;
}
use of org.nd4j.linalg.api.complex.IComplexNDArray in project nd4j by deeplearning4j.
the class Nd4j method scalar.
/**
* Create a scalar ndarray with the specified offset
*
* @param value the value to initialize the scalar with
* @param offset the offset of the ndarray
* @return the created ndarray
*/
public static IComplexNDArray scalar(IComplexNumber value, long offset) {
IComplexNDArray ret = INSTANCE.scalar(value, offset);
logCreationIfNecessary(ret);
return ret;
}
use of org.nd4j.linalg.api.complex.IComplexNDArray in project nd4j by deeplearning4j.
the class Nd4j method createComplex.
/**
* Creates a complex ndarray with the specified shape
*
* @param data the data to use with the ndarray
* @param rows the rows of the ndarray
* @param columns the columns of the ndarray
* @param stride the stride for the ndarray
* @param offset the offset of the ndarray
* @return the instance
*/
public static IComplexNDArray createComplex(float[] data, int rows, int columns, int[] stride, long offset) {
if (rows < 1 || columns < 1)
throw new ND4JIllegalStateException("Number of rows and columns should be positive for new INDArray");
IComplexNDArray ret = INSTANCE.createComplex(data, rows, columns, stride, offset);
logCreationIfNecessary(ret);
return ret;
}
use of org.nd4j.linalg.api.complex.IComplexNDArray in project nd4j by deeplearning4j.
the class Nd4j method complexFlatten.
/**
* Create a long row vector of all of the given ndarrays
* @param flatten the matrices to create the flattened ndarray for
* @return the flattened representation of
* these ndarrays
*/
public static IComplexNDArray complexFlatten(IComplexNDArray... flatten) {
IComplexNDArray ret = INSTANCE.complexFlatten(flatten);
logCreationIfNecessary(ret);
return ret;
}
Aggregations