From bcce1f8db41dce5a1834fdf7de78a5b8591a78e5 Mon Sep 17 00:00:00 2001 From: agibsonccc Date: Tue, 23 Mar 2021 17:21:36 +0900 Subject: [PATCH] Update Nd4jTestsC.java --- .../nd4j-tests/src/test/java/org/nd4j/linalg/Nd4jTestsC.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nd4j/nd4j-backends/nd4j-tests/src/test/java/org/nd4j/linalg/Nd4jTestsC.java b/nd4j/nd4j-backends/nd4j-tests/src/test/java/org/nd4j/linalg/Nd4jTestsC.java index de7a7598c..5519c9275 100644 --- a/nd4j/nd4j-backends/nd4j-tests/src/test/java/org/nd4j/linalg/Nd4jTestsC.java +++ b/nd4j/nd4j-backends/nd4j-tests/src/test/java/org/nd4j/linalg/Nd4jTestsC.java @@ -251,7 +251,7 @@ public class Nd4jTestsC extends BaseNd4jTestWithBackends { @MethodSource("org.nd4j.linalg.BaseNd4jTestWithBackends#configs") public void testSerialization(Nd4jBackend backend) throws Exception { Nd4j.getRandom().setSeed(12345); - INDArray arr = Nd4j.rand(1, 20); + INDArray arr = Nd4j.rand(1, 20).castTo(DataType.DOUBLE); File dir = testDir.resolve("new-dir-" + UUID.randomUUID().toString()).toFile(); assertTrue(dir.mkdirs()); @@ -2413,7 +2413,7 @@ public class Nd4jTestsC extends BaseNd4jTestWithBackends { @ParameterizedTest @MethodSource("org.nd4j.linalg.BaseNd4jTestWithBackends#configs") public void testPutAtIntervalIndexWithStride(Nd4jBackend backend) { - INDArray n1 = Nd4j.create(3, 3).assign(0.0.castTo(DataType.DOUBLE)); + INDArray n1 = Nd4j.create(3, 3).assign(0.0).castTo(DataType.DOUBLE)); INDArrayIndex[] indices = {NDArrayIndex.interval(0, 2, 3), NDArrayIndex.all()}; n1.put(indices, 1); INDArray expected = Nd4j.create(new double[][] {{1d, 1d, 1d}, {0d, 0d, 0d}, {1d, 1d, 1d}});