Rules#

The Rule enum and its member aliases

final class matrixlib.rule.Rule(value)#

Enum used to dictate row or column-wise interpretation

Each member maps to an index that will retrieve its corresponding dimension from a matrix shape (or any two-element sequence).

Rule should not be sub-classed, as many functions make the assumption that the class has just two members with values 0 and 1.

ROW: Literal[0] = 0#

Maps to literal 0

COL: Literal[1] = 1#

Maps to literal 1

__invert__() COL: 1>]#
__invert__() ROW: 0>]
__invert__() Rule

Return the rule corresponding to the opposite dimension

property handle: Literal['row', 'column']#

The rule’s un-Pythonized name

matrixlib.rule.ROW: ROW: 0>]] = Rule.ROW#

Equivalent to Rule.ROW

matrixlib.rule.COL: COL: 1>]] = Rule.COL#

Equivalent to Rule.COL