forked from SciSharp/NumSharp
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathNDArray.argmax.cs
More file actions
25 lines (24 loc) · 906 Bytes
/
NDArray.argmax.cs
File metadata and controls
25 lines (24 loc) · 906 Bytes
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
namespace NumSharp
{
public partial class NDArray
{
/// <summary>
/// Returns the indices of the maximum values along an axis.
/// </summary>
/// <returns>The index of the maximal value in the array.</returns>
/// <remarks>https://docs.scipy.org/doc/numpy/reference/generated/numpy.argmax.html</remarks>
public int argmax()
{
return np.argmax(this);
}
/// <summary>
/// Returns the indices of the maximum values along an axis.
/// </summary>
/// <returns>Array of indices into the array. It has the same shape as a.shape with the dimension along axis removed.</returns>
/// <remarks>https://docs.scipy.org/doc/numpy/reference/generated/numpy.argmax.html</remarks>
public int argmax(int axis)
{
return np.argmax(this, axis);
}
}
}