forked from SciSharp/NumSharp
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnp.reshape.cs
More file actions
41 lines (39 loc) · 1.84 KB
/
np.reshape.cs
File metadata and controls
41 lines (39 loc) · 1.84 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
namespace NumSharp
{
public static partial class np
{
/// <summary>
/// Gives a new shape to an array without changing its data.
/// </summary>
/// <param name="nd">Array to be reshaped.</param>
/// <param name="shape">The new shape should be compatible with the original shape. </param>
/// <returns>original <paramref name="nd"/> reshaped without copying.</returns>
/// <remarks>https://docs.scipy.org/doc/numpy-1.16.0/reference/generated/numpy.reshape.html</remarks>
public static NDArray reshape(NDArray nd, params int[] shape)
{
return nd.reshape(shape);
}
/// <summary>
/// Gives a new shape to an array without changing its data.
/// </summary>
/// <param name="nd">Array to be reshaped.</param>
/// <param name="shape">The new shape should be compatible with the original shape. </param>
/// <returns>original <paramref name="nd"/> reshaped without copying.</returns>
/// <remarks>https://docs.scipy.org/doc/numpy-1.16.0/reference/generated/numpy.reshape.html</remarks>
public static NDArray reshape(NDArray nd, Shape shape)
{
return nd.reshape(shape);
}
/// <summary>
/// Gives a new shape to an array without changing its data.
/// </summary>
/// <param name="nd">Array to be reshaped.</param>
/// <param name="shape">The new shape should be compatible with the original shape. </param>
/// <returns>original <paramref name="nd"/> reshaped without copying.</returns>
/// <remarks>https://docs.scipy.org/doc/numpy-1.16.0/reference/generated/numpy.reshape.html</remarks>
public static NDArray reshape(NDArray nd, ref Shape shape)
{
return nd.reshape(ref shape);
}
}
}