fips.Operator.align#

Operator.align(rows, cols)[source]#

Return the operator on rows and cols, which must have exactly its labels.

Parameters:
  • rows (Space) – The labels to put the rows and columns on, in any order (see Space.align()).

  • cols (Space) – The labels to put the rows and columns on, in any order (see Space.align()).

Returns:

The same matrix, its rows and columns reordered.

Return type:

Operator

Raises:

ValueError – If a space does not have the same labels as the operator’s; the message names those missing from either.