There are a couple non-intuitive things that can happen when performing operations on a vector3 with a numpy array. In the below screen-shot, there is an example using np.kron and showing that it is not commutative with the type that is returned depending on the order of inputs:np.kron(vector3, numpy) returns an (invalid) vector3, while np.kron(numpy, vector3) returns a numpy array. Ideally, the behaviour should be the latter, returning a numpy array (or a Vector3Array, but that might be getting to fancy).
@lheagy Thanks for this - I'm glad you are putting the vectormath properties through their paces. I've created a related issue here that should hopefully solve this: https://github.com/aranzgeo/vectormath/issues/26
There are a couple non-intuitive things that can happen when performing operations on a vector3 with a numpy array. In the below screen-shot, there is an example using
np.kron
and showing that it is not commutative with the type that is returned depending on the order of inputs:np.kron(vector3, numpy)
returns an (invalid)vector3
, whilenp.kron(numpy, vector3)
returns a numpy array. Ideally, the behaviour should be the latter, returning a numpy array (or aVector3Array
, but that might be getting to fancy).