- Main Page
- Tutorials
- Functions
- Release Notes
- Examples

Functions
stdev
Complete List of ArrayFire Functions ArrayFire Functions by Category » Statistics » | Basic statistics functions

Find the standar deviation of values in the input. More...

## Functions
AFAPI array | stdev (const array &in, const dim_t dim=-1)
| C++ Interface for standard deviation. More...
template<typename T >
AFAPI T | stdev (const array &in)
| C++ Interface for standard deviation of all elements. More...
AFAPI af_err | af_stdev (af_array *out, const af_array in, const dim_t dim)
| C Interface for standard deviation. More...
AFAPI af_err | af_stdev_all (double *real, double *imag, const af_array in)
| C Interface for standard deviation of all elements. More...

## Detailed Description

Find the standar deviation of values in the input.

This function performs the operation across all batches present in the input simultaneously.

## Function Documentation

AFAPI af_err af_stdev | ( | af_array * | out,
|  | const af_array | in,
|  | const dim_t | dim
| ) |  |

C Interface for standard deviation.

Parameters

  [out] | out | will contain the standard deviation of the input array along dimension `dim`
  [in] | in | is the input array
  [in] | dim | the dimension along which the standard deviation is extracted

Returns
  AF_SUCCESS if the color transformation is successful, otherwise an appropriate error code is returned.

AFAPI af_err af_stdev_all | ( | double * | real,
|  | double * | imag,
|  | const af_array | in
| ) |  |

C Interface for standard deviation of all elements.

Parameters

  [out] | real | will contain the real part of standard deviation of the entire input array
  [out] | imag | will contain the imaginary part of standard deviation of the entire input array
  [in] | in | is the input array

Returns
  AF_SUCCESS if the color transformation is successful, otherwise an appropriate error code is returned.

AFAPI array af::stdev | ( | const array & | in,
|  | const dim_t | dim = `-1`
| ) |  |

C++ Interface for standard deviation.

Parameters

  [in] | in | is the input array
  [in] | dim | the dimension along which the standard deviation is extracted

Returns
  the standard deviation of the input array along dimension `dim`

Note
  `dim` is -1 by default. -1 denotes the first non-singleton dimension.

AFAPI T af::stdev | ( | const array & | in | ) |

C++ Interface for standard deviation of all elements.

Parameters

  [in] | in | is the input array

Returns
  standard deviation of the entire input array