From 48e4fa0ec6e55973b9d8e822f536c994b5e21e14 Mon Sep 17 00:00:00 2001 From: Eli Belash Date: Sat, 5 Oct 2019 19:01:59 +0300 Subject: [PATCH] NDArray: Added option to set nd.shape = new int[] {3,-1}; --- src/NumSharp.Core/Backends/NDArray.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/NumSharp.Core/Backends/NDArray.cs b/src/NumSharp.Core/Backends/NDArray.cs index 6c7e391c..4a9cfc2d 100644 --- a/src/NumSharp.Core/Backends/NDArray.cs +++ b/src/NumSharp.Core/Backends/NDArray.cs @@ -256,7 +256,11 @@ protected internal unsafe void* Address /// /// Data length of every dimension /// - public int[] shape => Storage.Shape.Dimensions; + public int[] shape + { + get => Storage.Shape.Dimensions; + set => Storage.Reshape(value); + } /// /// Dimension count