This is a pre-release version (2.5.0.dev0+git20251130.2de293a). Go to latest (2.4.4)
{ } Raw JSON

bundles / numpy 2.5.0.dev0+git20251130.2de293a / numpy / ma / core / anom

function

numpy.ma.core:anom

source: build-install/usr/lib/python3.14/site-packages/numpy/ma/core.py :7063

Signature

def   anom ( self axis = None dtype = None )

Summary

Compute the anomalies (deviations from the arithmetic mean) along the given axis.

Extended Summary

Returns an array of anomalies, with the same shape as the input and where the arithmetic mean is computed along the given axis.

Parameters

axis : int, optional

Axis over which the anomalies are taken. The default is to use the mean of the flattened array as reference.

dtype : dtype, optional

Type to use in computing the variance. For arrays of integer type the default is float32; for arrays of float types it is the same as the array type.

Examples

import numpy as np
a = np.ma.array([1,2,3])
a.anom()

See also

mean

Compute the mean of the array.

Aliases

  • numpy.ma.anom