@Test public void when_notUsingShape_expect_transformTo1DINDArray() { ArrayToINDArrayTransform sut = new ArrayToINDArrayTransform(); double[] data = new double[] { 1.0, 2.0, 3.0 }; INDArray result = sut.transform(data); assertArrayEquals(new long[] { 3 }, result.shape()); assertEquals(1.0, result.getDouble(0), 0.00001); assertEquals(2.0, result.getDouble(1), 0.00001); assertEquals(3.0, result.getDouble(2), 0.00001); }
@Override public INDArray transform(double[] data) { INDArray result = Nd4j.create(data); if(shape != null) { result = result.reshape(shape); } return result; }
ArrayToINDArrayTransform implements Operation<double[], INDArray> { @Override public INDArray transform(double[] data) { INDArray result = Nd4j.create(data); if(shape != null) { result = result.reshape(shape); } return result; } }
ArrayToINDArrayTransform implements Operation<double[], INDArray> { @Override public INDArray transform(double[] data) { INDArray result = Nd4j.create(data); if(shape != null) { result = result.reshape(shape); } return result; } ArrayToINDArrayTransform(long... shape);  ArrayToINDArrayTransform(); }
ArrayToINDArrayTransform implements Operation<double[], INDArray> { @Override public INDArray transform(double[] data) { INDArray result = Nd4j.create(data); if(shape != null) { result = result.reshape(shape); } return result; } ArrayToINDArrayTransform(long... shape);  ArrayToINDArrayTransform(); @Override INDArray transform(double[] data); }
ArrayToINDArrayTransform implements Operation<double[], INDArray> { @Override public INDArray transform(double[] data) { INDArray result = Nd4j.create(data); if(shape != null) { result = result.reshape(shape); } return result; } ArrayToINDArrayTransform(long... shape);  ArrayToINDArrayTransform(); @Override INDArray transform(double[] data);  }