The function returns another sequence of 3-vectors, BUT this time with N+1 elements. Hence, I would like the output hint to re-employ the N variable. I'm thinking of something like
When I execute the above syntax I get the following error :
nptyping.error.InvalidShapeError: "3, N+1" is not a valid shape expression.
In general, how can I specify that one Shape object is related to another Shape by an algebraic expression (using *, +, -, /, **, ...) ? I'm sorry if there is already a related issue/a feature that I did not notice.
I encounter this situation anytime I deal with temporal sequences (kinematic simulation, logs extraction, state estimation etc.) : the sequence is N+1 elements-long while the sequence of deltas is N elements-long.
I have a function which takes as input a sequence of 3-vectors with
N
elements. My input hint isThe function returns another sequence of 3-vectors, BUT this time with
N+1
elements. Hence, I would like the output hint to re-employ theN
variable. I'm thinking of something likeWhen I execute the above syntax I get the following error :
nptyping.error.InvalidShapeError: "3, N+1" is not a valid shape expression.
In general, how can I specify that one
Shape
object is related to anotherShape
by an algebraic expression (using*
,+
,-
,/
,**
, ...) ? I'm sorry if there is already a related issue/a feature that I did not notice.I encounter this situation anytime I deal with temporal sequences (kinematic simulation, logs extraction, state estimation etc.) : the sequence is
N+1
elements-long while the sequence of deltas isN
elements-long.