Numpy/Scipy for IronPython in Rhino 5 (64-bit)


We have a working Rhino plugin that is developed using C#. It was targeted to run on Rhino 5 (32-bit).
Everything works fine and right now, we are working on migrating the plugin to run on Rhino 5 (64-bit).
One of the issue that we encounter is that a call to python script via Rhino.Runtime.PythonCompiledCode is throwing exception: “Could not add reference to assembly mtrand”.

After some googling, I found a post mentioning that numpy/scipy for IronPython will only run in 32bit applications on Windows ( This post dated back to 2011.

Does anyone know if this is still true? and if yes, is there any workaround?

Thank you,
Poh Nee

There are quite a few threads on this subject already (try running a search). But the short answer is that one cannot implement numpy in IronPython/Rhino 64 bit.

Or, at least not in any straightforward way: There are initiatives (1, 2) that target running CPython in Rhino/Grasshopper, which enables one to implement numpy/scipy. I haven’t really messed with either one, but there certainly are considerable dependencies and plumbing involved, making it less than straightforward.

An alternative (and arguably simpler) approach is to implement an equivalent .NET library (in this case, for instance Math.NET). Especially if you’re developing in C# in the first place.