lintrans.typing_ package
Module contents
This package supplies type aliases for linear algebra and transformations.
Note
This package is called typing_
and not typing
to avoid name collisions with the
builtin typing
. I don’t quite know how this collision occurs, but renaming
this module fixed the problem.
- lintrans.typing_.MatrixParseList
This is a list containing lists of tuples. Each tuple represents a matrix and is
(multiplier, matrix_identifier, index)
where all of them are strings. These matrix-representing tuples are contained in lists which represent multiplication groups. Every matrix in the group should be multiplied together, in order. These multiplication group lists are contained by a top level list, which is this type. Once these multiplication group lists have been evaluated, they should be summed.In the tuples, the multiplier is a string representing a real number, the matrix identifier is a capital letter or
rot(x)
where x is a real number angle, and the index is a string representing an integer, or it’s the letterT
for transpose.
- lintrans.typing_.MatrixType
This type represents a 2x2 matrix as a NumPy array.
- lintrans.typing_.VectorType
This type represents a 2D vector as a NumPy array, for use with
MatrixType
.
- lintrans.typing_.is_matrix_type(matrix: Any) TypeGuard[MatrixType] [source]
Check if the given value is a valid matrix type.
Note
This function is a TypeGuard, meaning if it returns True, then the passed value must be a
MatrixType
.