Closed bradley-solliday-skydio closed 2 years ago
This commit was motivated by me wanting to be able to define a function for code generation which takes a 9x9 and 9x3 geo matrices as arguments.
Would have been convenient to simply specify the input types as sf.M99 and sf.M93, but these don't exist.
sf.M99
sf.M93
Could have done something like type(geo.M(9, 9)) or geo.matrix_type_from_shape((9, 9)), but that wouldn't pass the linter.
type(geo.M(9, 9))
geo.matrix_type_from_shape((9, 9))
Perhaps a long term solution would be to have geo.Matrix subclass typing.Generic, but a number of issues would have to be worked out.
geo.Matrix
typing.Generic
As a stop gap, I am simply extending our manual definitions for matrices from just being up to 6x6 matrices to 9x9 matrices.
Merged by 48699d1a2db43a8d0c71ec51f717a6a7a2737d3c
This commit was motivated by me wanting to be able to define a function for code generation which takes a 9x9 and 9x3 geo matrices as arguments.
Would have been convenient to simply specify the input types as
sf.M99
andsf.M93
, but these don't exist.Could have done something like
type(geo.M(9, 9))
orgeo.matrix_type_from_shape((9, 9))
, but that wouldn't pass the linter.Perhaps a long term solution would be to have
geo.Matrix
subclasstyping.Generic
, but a number of issues would have to be worked out.As a stop gap, I am simply extending our manual definitions for matrices from just being up to 6x6 matrices to 9x9 matrices.