darsia.AxisReduction#

class AxisReduction(axis, dim=3, mode='average', **kwargs)[source]#

Bases: object

Object for reduction along a provided axis.

Parameters:
axisint or str

Numeric axis index (matrix indexing) or Cartesian axis.

dimint

Dimension of the input image.

modestr

Mode used in the reduction (“average”, “sum”, “slice”).

**kwargs

Additional arguments:

  • “slice_idx” (int): index of the slice (only for mode “slice”)

Raises:
NotImplementedError

If dim not 3.

Methods

Attributes

axis

Cartesian axis along which reduction is performed.

mode

Mode.

kwargs

Additional arguments.

axis#

Cartesian axis along which reduction is performed.

kwargs#

Additional arguments.

mode#

Mode.