lmpy.data_wrangling.matrix.purge_empty_slices_wrangler

Module containing occurrence data wranglers for purging empty matrix slices.

Module Contents

Classes

PurgeEmptySlicesWrangler

Constructor for PurgeEmptySlicesWrangler class.

class lmpy.data_wrangling.matrix.purge_empty_slices_wrangler.PurgeEmptySlicesWrangler(purge_axes=None, **params)[source]

Bases: lmpy.data_wrangling.matrix.base._MatrixDataWrangler

Constructor for PurgeEmptySlicesWrangler class.

Parameters
  • purge_axes (None, int, or list of int) – Matrix axes to be processed.

  • **params (dict) – Keyword parameters to pass to _MatrixDataWrangler.

name = PurgeEmptySlicesWrangler[source]
version = 1.0[source]
wrangle_matrix(self, matrix)[source]

Wrangle a matrix.

Parameters

matrix (Matrix) – A matrix to wrangle.

Returns

The matrix with empty slices purged.

Return type

Matrix