Python Forum

Full Version: Matrix Operations Without Numpy or Incorporating Python into Webpage
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi. I'm planning on using GlowScript, a program for creating 3D animations where you can write code in Python which is then converted to JavaScript for a webpage. It unfortunately does not allow you to import numpy. I would need several matrix operations for the project: matrix concatenation, matrix multiplication and division, and computing eigenvalues and eigenvectors. I was thinking it should be possible to write code for these operations myself, or even just copy the code from numpy. ( How feasible do you think this would be, and are there any alternatives?

Another option would be to use VPython, which is I think the same as GlowScript but doesn't allow for conversion to JavaScript. Does anyone know whether it's possible to incorporate Python code into a webpage?

Thanks!
Last question first - yes, look at Flask, or if you have a bigger project Django.

You can do all the matrix math without numpy, but you need to know how to do it. For example, matrix multiplication can be sorted at https://www.programiz.com/python-program...ply-matrix