diff --git a/src/TensorFlowNET.Core/Tensors/Tensor.Creation.cs b/src/TensorFlowNET.Core/Tensors/Tensor.Creation.cs index ce1b0db9c..a127d14d1 100644 --- a/src/TensorFlowNET.Core/Tensors/Tensor.Creation.cs +++ b/src/TensorFlowNET.Core/Tensors/Tensor.Creation.cs @@ -508,7 +508,7 @@ private unsafe IntPtr CreateTensorFromNDArray(NDArray nd, TF_DataType? given_dty if (nd.typecode == NPTypeCode.String) throw new NotImplementedException("Support for NDArray of type string not implemented yet"); - var arraySlice = nd.Unsafe.Storage.Shape.IsContiguous ? nd.GetData() : nd.CloneData(); + var arraySlice = nd.Unsafe.Storage.Shape.IsContiguous ? nd.CloneData() : nd.CloneData(); var handle = TF_NewTensor( given_dtype ?? nd.dtype.as_dtype(),