Routines to convert central (co)moments to raw (co)moments. (cmomy.convert
)#
Functions:
|
Convert central moments to raw moments. |
|
Convert central moments to raw moments. |
|
Convert central moments to raw moments. |
|
Convert raw comoments to central comoments. |
- cmomy.convert.to_raw_moments(x, axis=-1, dtype=None, order=None, out=None)[source]#
Convert central moments to raw moments.
- Parameters:
x (
ndarray
) –Central moments array. The expected structure is:
x[..., 0]
: weightx[..., 1]
: meanx[..., k]
: kth central moment
axis (
int
, default-1
) – Axis location of moments inx
.dtype (
str
, optional) – Optionalnumpy
data type to apply to output.order (
str
, optional) – Optional ordering (‘c’, ‘f’, etc) to apply to output.out (
ndarray
, optional) – Optional numpy output array. Should have same shape asx
.
- Returns:
out (
ndarray
) – Raw moments array. The expected structure is:out[..., 0]
: weightout[..., k]
: kth moment \(\langle a^k \rangle\)
- cmomy.convert.to_raw_comoments(x, axis=(-2, -1), dtype=None, order=None, out=None)[source]#
Convert central moments to raw moments.
- Parameters:
x (
ndarray
) –Central comoments array. The expected structure is:
x[..., 0, 0]
: weightx[..., 1, 0]
: mean of ax[....,0, 1]
: mean of bx[..., i, j]
: \(\langle (\delta a)^i (\delta b)^j \rangle\), where a and b are the variables being considered.
axis (
tuple
ofint
, default(-2,-1)
) – Axis locations of moments in comoments arrayx
dtype (
str
, optional) – Optionalnumpy
data type to apply to output.order (
str
, optional) – Optional ordering (‘c’, ‘f’, etc) to apply to output.out (
ndarray
, optional) – Optional numpy output array. Should have same shape asx
.
- Returns:
out (
ndarray
) – Raw comoments array. The expected structure is:out[..., 0, 0]
: weightout[..., i, j]
: \(\langle a^i b^j \rangle\), where a and b are the variables being considered.
- cmomy.convert.to_central_moments(x, axis=-1, dtype=None, order=None, out=None)[source]#
Convert central moments to raw moments.
- Parameters:
x (
ndarray
) –Raw moments array. The expected structure is:
x[..., 0]
: weightx[..., k]
: kth moment \(\langle a^k \rangle\)
axis (
int
, default-1
) – Axis location of moments inx
.dtype (
str
, optional) – Optionalnumpy
data type to apply to output.order (
str
, optional) – Optional ordering (‘c’, ‘f’, etc) to apply to output.out (
ndarray
, optional) – Optional numpy output array. Should have same shape asx
.
- Returns:
out (
ndarray
) – Central moments array. The expected structure is:out[..., 0]
: weightout[..., 1]
: meanout[..., k]
: kth central moment
- cmomy.convert.to_central_comoments(x, axis=(-2, -1), dtype=None, order=None, out=None)[source]#
Convert raw comoments to central comoments.
- Parameters:
x (
ndarray
) –Raw comoments array. The expected structure is:
x[..., 0, 0]
: weightx[..., i, j]
: \(\langle a^i b^j \rangle\), where a and b are the variables being considered.
axis (
tuple
ofint
, default(-2,-1)
) – Axis locations of moments in comoments arrayx
dtype (
str
, optional) – Optionalnumpy
data type to apply to output.order (
str
, optional) – Optional ordering (‘c’, ‘f’, etc) to apply to output.out (
ndarray
, optional) – Optional numpy output array. Should have same shape asx
.
- Returns:
out (
ndarray
) – Central comoments array. The expected structure is:out[..., 0, 0]
: weightout[..., 1, 0]
: mean of aout[....,0, 1]
: mean of bout[..., i, j]
: \(\langle (\delta a)^i (\delta b)^j \rangle\), where a and b are the variables being considered.