Skip to content

Commit 48e4fa0

Browse files
committed
NDArray: Added option to set nd.shape = new int[] {3,-1};
1 parent d8a34e3 commit 48e4fa0

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/NumSharp.Core/Backends/NDArray.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,11 @@ protected internal unsafe void* Address
256256
/// <summary>
257257
/// Data length of every dimension
258258
/// </summary>
259-
public int[] shape => Storage.Shape.Dimensions;
259+
public int[] shape
260+
{
261+
get => Storage.Shape.Dimensions;
262+
set => Storage.Reshape(value);
263+
}
260264

261265
/// <summary>
262266
/// Dimension count

0 commit comments

Comments
 (0)