forked from SciSharp/NumSharp
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnp.std.cs
More file actions
124 lines (116 loc) · 10.6 KB
/
np.std.cs
File metadata and controls
124 lines (116 loc) · 10.6 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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
using System;
using NumSharp.Backends;
namespace NumSharp
{
public static partial class np
{
/// <summary>
/// Compute the standard deviation along the specified axis.
/// Returns the standard deviation, a measure of the spread of a distribution, of the array elements. The standard deviation is computed for the flattened array by default, otherwise over the specified axis.
/// </summary>
/// <param name="a">Calculate the standard deviation of these values.</param>
/// <param name="axis">Axis or axes along which the standard deviation is computed. The default is to compute the standard deviation of the flattened array.</param>
/// <param name="keepdims">
/// If this is set to True, the axes which are reduced are left in the result as dimensions with size one. With this option, the result will broadcast correctly against the input array.
/// </param>
/// <param name="ddof">Means Delta Degrees of Freedom. The divisor used in calculations is N - ddof, where N represents the number of elements. By default ddof is zero.</param>
/// <returns> returns a new array containing the std values, otherwise a reference to the output array is returned.</returns>
/// <remarks>https://docs.scipy.org/doc/numpy/reference/generated/numpy.std.html</remarks>
public static NDArray std(NDArray a, bool keepdims = false, int? ddof = null, NPTypeCode? dtype = null)
{
return a.TensorEngine.ReduceStd(a, null, keepdims, ddof, dtype);
}
/// <summary>
/// Compute the standard deviation along the specified axis.
/// Returns the standard deviation, a measure of the spread of a distribution, of the array elements. The standard deviation is computed for the flattened array by default, otherwise over the specified axis.
/// </summary>
/// <param name="a">Calculate the standard deviation of these values.</param>
/// <param name="ddof">Means Delta Degrees of Freedom. The divisor used in calculations is N - ddof, where N represents the number of elements. By default ddof is zero.</param>
/// <returns> returns a new array containing the std values, otherwise a reference to the output array is returned.</returns>
/// <remarks>https://docs.scipy.org/doc/numpy/reference/generated/numpy.std.html</remarks>
public static NDArray std(in NDArray a, int? ddof = null)
=> a.TensorEngine.ReduceStd(a, null);
/// <summary>
/// Compute the standard deviation along the specified axis.
/// Returns the standard deviation, a measure of the spread of a distribution, of the array elements. The standard deviation is computed for the flattened array by default, otherwise over the specified axis.
/// </summary>
/// <param name="a">Calculate the standard deviation of these values.</param>
/// <param name="axis">Axis or axes along which the standard deviation is computed. The default is to compute the standard deviation of the flattened array.</param>
/// <param name="ddof">Means Delta Degrees of Freedom. The divisor used in calculations is N - ddof, where N represents the number of elements. By default ddof is zero.</param>
/// <returns> returns a new array containing the std values, otherwise a reference to the output array is returned.</returns>
/// <remarks>https://docs.scipy.org/doc/numpy/reference/generated/numpy.std.html</remarks>
public static NDArray std(in NDArray a, int axis, int? ddof = null)
=> a.TensorEngine.ReduceStd(a, axis, ddof: ddof);
/// <summary>
/// Compute the standard deviation along the specified axis.
/// Returns the standard deviation, a measure of the spread of a distribution, of the array elements. The standard deviation is computed for the flattened array by default, otherwise over the specified axis.
/// </summary>
/// <param name="a">Calculate the standard deviation of these values.</param>
/// <param name="keepdims">
/// If this is set to True, the axes which are reduced are left in the result as dimensions with size one. With this option, the result will broadcast correctly against the input array.
/// </param>
/// <param name="ddof">Means Delta Degrees of Freedom. The divisor used in calculations is N - ddof, where N represents the number of elements. By default ddof is zero.</param>
/// <returns> returns a new array containing the std values, otherwise a reference to the output array is returned.</returns>
/// <remarks>https://docs.scipy.org/doc/numpy/reference/generated/numpy.std.html</remarks>
public static NDArray std(in NDArray a, bool keepdims, int? ddof = null)
=> a.TensorEngine.ReduceStd(a, null, keepdims, ddof: ddof);
/// <summary>
/// Compute the standard deviation along the specified axis.
/// Returns the standard deviation, a measure of the spread of a distribution, of the array elements. The standard deviation is computed for the flattened array by default, otherwise over the specified axis.
/// </summary>
/// <param name="a">Calculate the standard deviation of these values.</param>
/// <param name="axis">Axis or axes along which the standard deviation is computed. The default is to compute the standard deviation of the flattened array.</param>
/// <param name="keepdims">
/// If this is set to True, the axes which are reduced are left in the result as dimensions with size one. With this option, the result will broadcast correctly against the input array.
/// </param>
/// <param name="ddof">Means Delta Degrees of Freedom. The divisor used in calculations is N - ddof, where N represents the number of elements. By default ddof is zero.</param>
/// <returns> returns a new array containing the std values, otherwise a reference to the output array is returned.</returns>
/// <remarks>https://docs.scipy.org/doc/numpy/reference/generated/numpy.std.html</remarks>
public static NDArray std(in NDArray a, int axis, Type dtype, bool keepdims = false, int? ddof = null)
=> a.TensorEngine.ReduceStd(a, axis, keepdims, ddof, dtype != null ? dtype.GetTypeCode() : (NPTypeCode?)null);
/// <summary>
/// Compute the standard deviation along the specified axis.
/// Returns the standard deviation, a measure of the spread of a distribution, of the array elements. The standard deviation is computed for the flattened array by default, otherwise over the specified axis.
/// </summary>
/// <param name="a">Calculate the standard deviation of these values.</param>
/// <param name="axis">Axis or axes along which the standard deviation is computed. The default is to compute the standard deviation of the flattened array.</param>
/// <param name="keepdims">
/// If this is set to True, the axes which are reduced are left in the result as dimensions with size one. With this option, the result will broadcast correctly against the input array.
/// </param>
/// <param name="ddof">Means Delta Degrees of Freedom. The divisor used in calculations is N - ddof, where N represents the number of elements. By default ddof is zero.</param>
/// <returns> returns a new array containing the std values, otherwise a reference to the output array is returned.</returns>
/// <remarks>https://docs.scipy.org/doc/numpy/reference/generated/numpy.std.html</remarks>
public static NDArray std(in NDArray a, int axis, NPTypeCode type, bool keepdims = false, int? ddof = null)
=> a.TensorEngine.ReduceStd(a, axis, keepdims, ddof, type);
/// <summary>
/// Compute the standard deviation along the specified axis.
/// Returns the standard deviation, a measure of the spread of a distribution, of the array elements. The standard deviation is computed for the flattened array by default, otherwise over the specified axis.
/// </summary>
/// <param name="a">Calculate the standard deviation of these values.</param>
/// <param name="axis">Axis or axes along which the standard deviation is computed. The default is to compute the standard deviation of the flattened array.</param>
/// <param name="keepdims">
/// If this is set to True, the axes which are reduced are left in the result as dimensions with size one. With this option, the result will broadcast correctly against the input array.
/// </param>
/// <param name="ddof">Means Delta Degrees of Freedom. The divisor used in calculations is N - ddof, where N represents the number of elements. By default ddof is zero.</param>
/// <returns> returns a new array containing the std values, otherwise a reference to the output array is returned.</returns>
/// <remarks>https://docs.scipy.org/doc/numpy/reference/generated/numpy.std.html</remarks>
public static NDArray std(in NDArray a, int axis, bool keepdims, int? ddof = null)
=> a.TensorEngine.ReduceStd(a, axis, keepdims, ddof: ddof);
/// <summary>
/// Compute the standard deviation along the specified axis.
/// Returns the standard deviation, a measure of the spread of a distribution, of the array elements. The standard deviation is computed for the flattened array by default, otherwise over the specified axis.
/// </summary>
/// <param name="a">Calculate the standard deviation of these values.</param>
/// <param name="axis">Axis or axes along which the standard deviation is computed. The default is to compute the standard deviation of the flattened array.</param>
/// <param name="keepdims">
/// If this is set to True, the axes which are reduced are left in the result as dimensions with size one. With this option, the result will broadcast correctly against the input array.
/// </param>
/// <param name="ddof">Means Delta Degrees of Freedom. The divisor used in calculations is N - ddof, where N represents the number of elements. By default ddof is zero.</param>
/// <returns> returns a new array containing the std values, otherwise a reference to the output array is returned.</returns>
/// <remarks>https://docs.scipy.org/doc/numpy/reference/generated/numpy.std.html</remarks>
public static NDArray std(NDArray a, int axis, bool keepdims = false, int? ddof = null, NPTypeCode? dtype = null)
{
return a.TensorEngine.ReduceStd(a, axis, keepdims, ddof, dtype);
}
}
}