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 shape the shape of the ndarray
* @param stride the stride for the ndarray
* @param offset the offset of the ndarray
* @return the instance
*/
public static IComplexNDArray createComplex(int[] shape, int[] stride, long offset, char ordering) {
checkShapeValues(shape);
IComplexNDArray ret = INSTANCE.createComplex(shape, stride, offset, ordering);
logCreationIfNecessary(ret);
return ret;
}
use of org.nd4j.linalg.api.complex.IComplexNDArray in project nd4j by deeplearning4j.
the class Nd4j method complexValueOf.
/**
* @param num
* @param value
* @return
*/
public static IComplexNDArray complexValueOf(int num, IComplexNumber value) {
IComplexNDArray ret = INSTANCE.complexValueOf(num, value);
logCreationIfNecessary(ret);
return ret;
}
use of org.nd4j.linalg.api.complex.IComplexNDArray in project nd4j by deeplearning4j.
the class Nd4j method repeat.
/**
* Create an n x (shape)
* ndarray where the ndarray is repeated num times
*
* @param n the ndarray to replicate
* @param num the number of copies to repeat
* @return the repeated ndarray
*/
public static IComplexNDArray repeat(IComplexNDArray n, int num) {
List<IComplexNDArray> list = new ArrayList<>();
for (int i = 0; i < num; i++) list.add(n.dup());
IComplexNDArray ret = Nd4j.createComplex(list, Ints.concat(new int[] { num }, n.shape()));
logCreationIfNecessary(ret);
return ret;
}
use of org.nd4j.linalg.api.complex.IComplexNDArray in project nd4j by deeplearning4j.
the class Nd4j method concat.
/**
* Concatneate ndarrays along a dimension
*
* @param dimension the dimension to concatneate along
* @param toConcat the ndarrays to concat
* @return the concatted ndarrays with an output shape of
* the ndarray shapes save the dimension shape specified
* which is then the sum of the sizes along that dimension
*/
public static IComplexNDArray concat(int dimension, IComplexNDArray... toConcat) {
IComplexNDArray ret = INSTANCE.concat(dimension, toConcat);
logCreationIfNecessary(ret);
return ret;
}
use of org.nd4j.linalg.api.complex.IComplexNDArray in project nd4j by deeplearning4j.
the class Nd4j method complexScalar.
/**
* 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 complexScalar(Number value, long offset) {
IComplexNDArray arr = INSTANCE.complexScalar(value, offset);
logCreationIfNecessary(arr);
return arr;
}
Aggregations