Skip to content

Commit 9994c2b

Browse files
committed
NDArray: Added nd.flatten()
1 parent 1bacf33 commit 9994c2b

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
using System.Diagnostics.CodeAnalysis;
2+
3+
namespace NumSharp
4+
{
5+
[SuppressMessage("ReSharper", "ParameterHidesMember")]
6+
public partial class NDArray
7+
{
8+
/// <summary>
9+
/// Return a copy of the array collapsed into one dimension.
10+
/// </summary>
11+
/// <param name="order"></param>
12+
/// <returns>A copy of the input array, flattened to one dimension.</returns>
13+
/// <remarks>https://docs.scipy.org/doc/numpy/reference/generated/numpy.ndarray.flatten.html</remarks>
14+
public NDArray flatten(char order = 'C') => flat.copy(order);
15+
}
16+
}

0 commit comments

Comments
 (0)