Compute the standard deviation along the specified axis, while ignoring NaNs. Returns the standard deviation, a measure of the spread of a distribution, of the non-NaN array elements. The standard deviation is computed for the flattened array by default, otherwise over the
(a, axis=None, dtype=None, out=None, ddof=0, keepdims=np._NoValue,
*, where=np._NoValue, mean=np._NoValue, correction=np._NoValue)
| 1882 | |
| 1883 | @array_function_dispatch(_nanstd_dispatcher) |
| 1884 | def nanstd(a, axis=None, dtype=None, out=None, ddof=0, keepdims=np._NoValue, |
| 1885 | *, where=np._NoValue, mean=np._NoValue, correction=np._NoValue): |
| 1886 | """ |
| 1887 | Compute the standard deviation along the specified axis, while |
| 1888 | ignoring NaNs. |
| 1889 | |
| 1890 | Returns the standard deviation, a measure of the spread of a |
| 1891 | distribution, of the non-NaN array elements. The standard deviation is |
| 1892 | computed for the flattened array by default, otherwise over the |
| 1893 | specified axis. |
| 1894 | |
| 1895 | For all-NaN slices or slices with zero degrees of freedom, NaN is |
| 1896 | returned and a `RuntimeWarning` is raised. |
| 1897 | |
| 1898 | Parameters |
| 1899 | ---------- |
| 1900 | a : array_like |
| 1901 | Calculate the standard deviation of the non-NaN values. |
| 1902 | axis : {int, tuple of int, None}, optional |
| 1903 | Axis or axes along which the standard deviation is computed. The default is |
| 1904 | to compute the standard deviation of the flattened array. |
| 1905 | dtype : dtype, optional |
| 1906 | Type to use in computing the standard deviation. For arrays of |
| 1907 | integer type the default is float64, for arrays of float types it |
| 1908 | is the same as the array type. |
| 1909 | out : ndarray, optional |
| 1910 | Alternative output array in which to place the result. It must have |
| 1911 | the same shape as the expected output but the type (of the |
| 1912 | calculated values) will be cast if necessary. |
| 1913 | ddof : {int, float}, optional |
| 1914 | Means Delta Degrees of Freedom. The divisor used in calculations |
| 1915 | is ``N - ddof``, where ``N`` represents the number of non-NaN |
| 1916 | elements. By default `ddof` is zero. |
| 1917 | |
| 1918 | keepdims : bool, optional |
| 1919 | If this is set to True, the axes which are reduced are left |
| 1920 | in the result as dimensions with size one. With this option, |
| 1921 | the result will broadcast correctly against the original `a`. |
| 1922 | |
| 1923 | If this value is anything but the default it is passed through |
| 1924 | as-is to the relevant functions of the sub-classes. If these |
| 1925 | functions do not have a `keepdims` kwarg, a RuntimeError will |
| 1926 | be raised. |
| 1927 | where : array_like of bool, optional |
| 1928 | Elements to include in the standard deviation. |
| 1929 | See `~numpy.ufunc.reduce` for details. |
| 1930 | |
| 1931 | .. versionadded:: 1.22.0 |
| 1932 | |
| 1933 | mean : array_like, optional |
| 1934 | Provide the mean to prevent its recalculation. The mean should have |
| 1935 | a shape as if it was calculated with ``keepdims=True``. |
| 1936 | The axis for the calculation of the mean should be the same as used in |
| 1937 | the call to this std function. |
| 1938 | |
| 1939 | .. versionadded:: 2.0.0 |
| 1940 | |
| 1941 | correction : {int, float}, optional |
nothing calls this directly
no test coverage detected
searching dependent graphs…