How to use numpy in Mechanical Scripting?
ZZ.tang
Member Posts: 14
**
in Structures
Best Answer
-
Hi @ZZ.tang , currently Mechanical Scripting is based on IronPython, so it is not possible to use Numpy, which is based on CPython. There is a beta option you can turn on to activate the possibility to use CPython in Mechanical but it is beta (ie, we do not guarantee it will work and do not provide support over it).
From the WB project schematic, go to tools /options / appearance and select "beta option":Then, in the same menu, go to Mechanical and activate "Show CPython Capability":
Another method to be able to use Numpy with Mechanical would be to use PyMechanical.
0
Answers
-
A third option is to run CPython as a subprocess from IronPython
1