Ignition compatible scientific/numpy-like libraries?

Does anyone know of any good substitutes for numpy which work with Ignition? I understand that we cannot use many scientific python libraries because they typically have CPython dependencies. It would be very useful for doing matrix-type operations on data, FFTs, linear algebra, stats, etc…

Thanks!

Some of the things you want are in Apache Math, which is included in Ignition since 7.9.8. You’ll need to import apache math into your script, and then you’ll have access to the entire library.

1 Like

Just remember that you can’t do wildcard imports with java libraries.

1 Like

Some day I’m going to have that blog post fixed. (It works when running in the IDE). But today is not that day. :slight_smile:

1 Like

Thanks for the reply!

I tried importing org.apache.commons.math4.linear after upgrading to 7.9.8, but it doesn’t look like this class is included in the update. The math3 package appears to import OK but this unfortunately doesn’t include the RealMatrix interface. Is this something I will have to manually add?

http://commons.apache.org/proper/commons-math/apidocs/org/apache/commons/math4/linear/RealMatrix.html

It looks like we’ve included commons-math 3.6.1, so make sure you are referencing documentation and classes for that version.

2 Likes

Got it. I was referencing the wrong version. :sweat_smile: (for the record, RealMatrix is also in math3: https://commons.apache.org/proper/commons-math/javadocs/api-3.6.1/index.html)

Thanks for the help!