From a6ca87dce61b4403e8ffd654df29404c31083123 Mon Sep 17 00:00:00 2001 From: "raver119@gmail.com" Date: Thu, 30 Apr 2020 11:22:25 +0300 Subject: [PATCH] one deprecated method Signed-off-by: raver119@gmail.com --- .../src/main/java/org/nd4j/linalg/util/NDArrayUtil.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/util/NDArrayUtil.java b/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/util/NDArrayUtil.java index 4da81b889..545c85806 100644 --- a/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/util/NDArrayUtil.java +++ b/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/util/NDArrayUtil.java @@ -24,11 +24,15 @@ import org.nd4j.linalg.factory.Nd4j; /** * Created by agibsonccc on 2/26/16. + * + * This class is deprecated. Please use Nd4j.createFromArray(...) methods instead */ +@Deprecated public class NDArrayUtil { private NDArrayUtil() {} + @Deprecated public static INDArray toNDArray(int[][] nums) { if (Nd4j.dataType() == DataType.DOUBLE) { double[] doubles = ArrayUtil.toDoubles(nums); @@ -42,6 +46,7 @@ public class NDArrayUtil { } + @Deprecated public static INDArray toNDArray(int[] nums) { if (Nd4j.dataType() == DataType.DOUBLE) { double[] doubles = ArrayUtil.toDoubles(nums); @@ -54,6 +59,7 @@ public class NDArrayUtil { } } + @Deprecated public static INDArray toNDArray(long[] nums) { if (Nd4j.dataType() == DataType.DOUBLE) { double[] doubles = ArrayUtil.toDoubles(nums); @@ -66,7 +72,7 @@ public class NDArrayUtil { } } - + @Deprecated public static int[] toInts(INDArray n) { if (n.length() > Integer.MAX_VALUE) throw new ND4JIllegalStateException("Can't convert INDArray with length > Integer.MAX_VALUE"); @@ -78,6 +84,7 @@ public class NDArrayUtil { return ret; } + @Deprecated public static long[] toLongs(INDArray n) { if (n.length() > Integer.MAX_VALUE) throw new ND4JIllegalStateException("Can't convert INDArray with length > Integer.MAX_VALUE");