I have a function that returns a 5x5 matrix of float values. The only way I’ve found to write an annotation for this is
tuple[
tuple[float, float, float, float, float],
tuple[float, float, float, float, float],
tuple[float, float, float, float, float],
tuple[float, float, float, float, float],
tuple[float, float, float, float, float],
]
Is that really the best way of writing this?
Before anyone suggests it, giving it an alias is basically pointless, as it’s only explicitly named once in my code. I could do sonething like t5 = tuple[float, float, float, float, float]
and then use tuple[t5, t5, t5, t5, t5]
, but it’s still incredibly repetitive.