From 6d2135833151adeb5aae5801256c8ee3b40ea652 Mon Sep 17 00:00:00 2001 From: Oceania2018 Date: Sun, 5 Dec 2021 11:23:40 -0600 Subject: [PATCH] fix init ndarray in int array. #884 --- src/TensorFlowNET.Core/Numpy/NDArray.Creation.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/TensorFlowNET.Core/Numpy/NDArray.Creation.cs b/src/TensorFlowNET.Core/Numpy/NDArray.Creation.cs index fc8d6539..e70d6a0e 100644 --- a/src/TensorFlowNET.Core/Numpy/NDArray.Creation.cs +++ b/src/TensorFlowNET.Core/Numpy/NDArray.Creation.cs @@ -25,6 +25,9 @@ namespace Tensorflow.NumPy public NDArray(byte[] bytes, Shape shape, TF_DataType dtype) : base(bytes, shape, dtype) => NewEagerTensorHandle(); + public NDArray(int[] value, Shape? shape = null) : base(value, shape) + => NewEagerTensorHandle(); + public NDArray(long[] value, Shape? shape = null) : base(value, shape) => NewEagerTensorHandle();