Density.center_of_mass#

Density.center_of_mass(arr=None, cutoff=None)[source]#

Computes the center of mass of a numpy ndarray instance.

Parameters:
arrNDArray, optional

Array to compute the center of mass of, default is Density.data.

cutofffloat, optional

Density cutoff for calculation. Defaults to None

Returns:
NDArray

Center of mass with shape (arr.ndim).