Skip to content

Commit

Permalink
NDArray: Added option to set nd.shape = new int[] {3,-1};
Browse files Browse the repository at this point in the history
  • Loading branch information
Nucs committed Oct 5, 2019
1 parent d8a34e3 commit 48e4fa0
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/NumSharp.Core/Backends/NDArray.cs
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,11 @@ protected internal unsafe void* Address
/// <summary>
/// Data length of every dimension
/// </summary>
public int[] shape => Storage.Shape.Dimensions;
public int[] shape
{
get => Storage.Shape.Dimensions;
set => Storage.Reshape(value);
}

/// <summary>
/// Dimension count
Expand Down

0 comments on commit 48e4fa0

Please sign in to comment.