Newbie trying to multiply vectors and matrices in Rhino script with python

I’ve been using Rhino for a couple of years but I’m just now learning to use scripts and I’m relatively new to Python as well. I’ve done some programs in Python using matrices and vectors with the module numpy. Rhino doesn’t seem to recognize numpy. Is there a way to add it or is there a Rhino way to deal with doing math on Python lists used as vectors?

Hello,

I think you need the math.NET library - numpy will not work with Ironpython in Rhino.

You can use complex numbers as two value vectors and there may be some stuff built in to rhino too…

Graham

Here you find many methods you can use on vectors, hth:

https://developer.rhino3d.com/api/RhinoCommon/html/Methods_T_Rhino_Geometry_Vector3d.htm

1 Like

Okay. I did find at https://developer.rhino3d.com/api/RhinoScriptSyntax/#collapse-VectorRotate
some methods that I think will work for me. Good to know that numpy does not work in Ironpython in Rhino. These are the sorts of things that frustrate me about Python.