/** * * @param data * @param ordering * @return */ public static INDArray create(double[][] data, char ordering) { return INSTANCE.create(data, ordering); }
/** * * @param data * @return */ public static INDArray create(float[][] data) { return INSTANCE.create(data); }
/** * Create an ndarray based on the given data layout * * @param data the data to use * @return an ndarray with the given data layout */ public static INDArray create(double[][] data) { return INSTANCE.create(data); }
/** * * @param data * @param ordering * @return */ public static INDArray create(float[][] data, char ordering) { return INSTANCE.create(data, ordering); }
/** * Creates a row vector with the data * * @param data the columns of the ndarray * @return the created ndarray */ public static INDArray create(float[] data, char order) { INDArray ret = INSTANCE.create(data, order); logCreationIfNecessary(ret); return ret; }
/** * Creates a row vector with the data * * @param data the columns of the ndarray * @return the created ndarray */ public static INDArray create(double[] data, char order) { INDArray ret = INSTANCE.create(data, order); logCreationIfNecessary(ret); return ret; }
/** * * @param buffer * @return */ public static INDArray create(DataBuffer buffer) { INDArray ret = INSTANCE.create(buffer); logCreationIfNecessary(ret); return ret; }
/** * Create an ndarray of zeros * * @param shape the shape of the ndarray * @return an ndarray with ones filled in */ public static INDArray zeros(int[] shape, char order) { checkShapeValues(shape); INDArray ret = INSTANCE.create(shape, order); logCreationIfNecessary(ret); return ret; }
public static INDArray create(DataBuffer data, long[] newShape, long[] newStride, long offset, char ordering) { checkShapeValues(newShape); INDArray ret = INSTANCE.create(data, newShape, newStride, offset, ordering); logCreationIfNecessary(ret); return ret; }
/** * * @param data * @param shape * @return */ public static INDArray create(DataBuffer data, int[] shape) { checkShapeValues(shape); INDArray ret = INSTANCE.create(data, shape); logCreationIfNecessary(ret); return ret; }
public static INDArray zeros(long[] shape, char order) { checkShapeValues(shape); INDArray ret = INSTANCE.create(shape, order); logCreationIfNecessary(ret); return ret; }
public static INDArray create(DataBuffer data, long[] shape) { checkShapeValues(shape); INDArray ret = INSTANCE.create(data, shape); logCreationIfNecessary(ret); return ret; }
public static INDArray create(long[] shape, char ordering) { //ensure shapes that wind up being scalar end up with the write shape checkShapeValues(shape); INDArray ret = INSTANCE.create(shape, ordering); logCreationIfNecessary(ret); return ret; }
public static INDArray create(DataBuffer data, long[] shape, long[] strides, long offset) { shape = getEnsuredShape(shape); checkShapeValues(shape); INDArray ret = INSTANCE.create(data, shape, strides, offset); logCreationIfNecessary(ret); return ret; }
public static INDArray create(float[] data, long[] shape, char ordering) { shape = getEnsuredShape(shape); checkShapeValues(data.length, shape); INDArray ret = INSTANCE.create(data, shape, 0, ordering); logCreationIfNecessary(ret); return ret; }
public static INDArray create(long[] shape, long[] stride, char ordering) { shape = getEnsuredShape(shape); checkShapeValues(shape); INDArray ret = INSTANCE.create(shape, stride, 0, ordering); logCreationIfNecessary(ret); return ret; }
public static INDArray create(List<INDArray> list, long[] shape) { shape = getEnsuredShape(shape); checkShapeValues(shape); INDArray ret = INSTANCE.create(list, shape); logCreationIfNecessary(ret); return ret; }
public static INDArray create(double[] data, long[] shape, char ordering) { shape = getEnsuredShape(shape); checkShapeValues(data.length, shape); INDArray ret = INSTANCE.create(data, shape, 0, ordering); logCreationIfNecessary(ret); return ret; }
/** * Creates an ndarray with the specified shape * * @param shape the shape of the ndarray * @return the instance */ public static INDArray create(List<INDArray> list, int[] shape) { shape = getEnsuredShape(shape); checkShapeValues(shape); INDArray ret = INSTANCE.create(list, shape); logCreationIfNecessary(ret); return ret; }
public static INDArray create(double[] data, int[] shape, char ordering, long offset) { shape = getEnsuredShape(shape); if (shape.length == 1) { if (shape[0] != data.length) throw new ND4JIllegalStateException("Shape of the new array " + Arrays.toString(shape) + " doesn't match data length: " + data.length); } checkShapeValues(data.length, shape); INDArray ret = INSTANCE.create(data, shape, getStrides(shape, ordering), offset, ordering); logCreationIfNecessary(ret); return ret; }