Search in sources :

Example 21 with IComplexNDArray

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 rows    the rows of the ndarray
 * @param columns the columns of the ndarray
 * @param stride  the stride for the ndarray
 * @return the instance
 */
public static IComplexNDArray createComplex(int rows, int columns, int[] stride, char ordering) {
    int[] shape = getEnsuredShape(rows, columns);
    checkShapeValues(shape);
    IComplexNDArray ret = INSTANCE.createComplex(shape, stride, ordering);
    logCreationIfNecessary(ret);
    return ret;
}
Also used : IComplexNDArray(org.nd4j.linalg.api.complex.IComplexNDArray)

Example 22 with IComplexNDArray

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 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(float[] data, int[] shape, int[] stride, long offset, char ordering) {
    shape = getEnsuredShape(shape);
    checkShapeValues(shape);
    IComplexNDArray ret = INSTANCE.createComplex(data, shape, stride, offset, ordering);
    logCreationIfNecessary(ret);
    return ret;
}
Also used : IComplexNDArray(org.nd4j.linalg.api.complex.IComplexNDArray)

Example 23 with IComplexNDArray

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(List<IComplexNDArray> flatten) {
    IComplexNDArray ret = INSTANCE.complexFlatten(flatten);
    logCreationIfNecessary(ret);
    return ret;
}
Also used : IComplexNDArray(org.nd4j.linalg.api.complex.IComplexNDArray)

Example 24 with IComplexNDArray

use of org.nd4j.linalg.api.complex.IComplexNDArray in project nd4j by deeplearning4j.

the class Nd4j method createComplex.

/**
 * Create an ndrray with the specified shape
 *
 * @param data   the data to use with tne ndarray
 * @param shape  the shape of the ndarray
 * @param stride the stride for the ndarray
 * @return the created ndarray
 */
public static IComplexNDArray createComplex(float[] data, int[] shape, int[] stride) {
    shape = getEnsuredShape(shape);
    checkShapeValues(shape);
    IComplexNDArray ret = INSTANCE.createComplex(data, shape, stride);
    logCreationIfNecessary(ret);
    return ret;
}
Also used : IComplexNDArray(org.nd4j.linalg.api.complex.IComplexNDArray)

Example 25 with IComplexNDArray

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
 * @return the instance
 */
public static IComplexNDArray createComplex(int[] shape, char ordering) {
    shape = getEnsuredShape(shape);
    checkShapeValues(shape);
    IComplexNDArray ret = INSTANCE.createComplex(createBuffer(ArrayUtil.prodLong(shape) * 2), shape, 0, ordering);
    logCreationIfNecessary(ret);
    return ret;
}
Also used : IComplexNDArray(org.nd4j.linalg.api.complex.IComplexNDArray)

Aggregations

IComplexNDArray (org.nd4j.linalg.api.complex.IComplexNDArray)74 ND4JIllegalStateException (org.nd4j.linalg.exception.ND4JIllegalStateException)6 INDArray (org.nd4j.linalg.api.ndarray.INDArray)5 IComplexNumber (org.nd4j.linalg.api.complex.IComplexNumber)3 DecimalFormat (java.text.DecimalFormat)2 INDArrayIndex (org.nd4j.linalg.indexing.INDArrayIndex)2 AllocationPoint (org.nd4j.jita.allocator.impl.AllocationPoint)1 DataBuffer (org.nd4j.linalg.api.buffer.DataBuffer)1 IComplexDouble (org.nd4j.linalg.api.complex.IComplexDouble)1