Search in sources :

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

Example 57 with IComplexNDArray

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

the class Nd4j method scalar.

/**
 * Create a scalar nd array with the specified value and offset
 *
 * @param value the value of the scalar
 *              =     * @return the scalar nd array
 */
public static IComplexNDArray scalar(IComplexDouble value) {
    IComplexNDArray ret = INSTANCE.scalar(value);
    logCreationIfNecessary(ret);
    return ret;
}
Also used : IComplexNDArray(org.nd4j.linalg.api.complex.IComplexNDArray)

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

Example 59 with IComplexNDArray

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

the class Nd4j method scalar.

/**
 * Create a scalar nd array with the specified value and offset
 *
 * @param value  the value of the scalar
 * @param offset the offset of the ndarray
 * @return the scalar nd array
 */
public static IComplexNDArray scalar(IComplexDouble value, long offset) {
    IComplexNDArray ret = INSTANCE.scalar(value, offset);
    logCreationIfNecessary(ret);
    return ret;
}
Also used : IComplexNDArray(org.nd4j.linalg.api.complex.IComplexNDArray)

Example 60 with IComplexNDArray

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

the class Nd4j method createComplex.

/**
 * @param data
 * @param shape
 * @return
 */
public static IComplexNDArray createComplex(DataBuffer data, int[] shape) {
    checkShapeValues(shape);
    IComplexNDArray ret = INSTANCE.createComplex(data, shape);
    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