Python Math Library made in 3 Days as a 14 year-old - libmaths
Mean method in math module
Do you have a preferred 3D math library?
I use numpy. It's a mistake to throw out numpy because it's missing one thing. Norms for instance are handled very well and you can use the axis parameter to calculate a lot of them. A magnitude is just an L2-norm.
Quaternions can be implemented using a class and can look like numpy arrays.
More on reddit.comIs it true that Python with math libraries is superior to MATLAB?
Videos
Hey r/Python! Today, I wanted to make a post about a recent project I took upon myself (This is my first "major" project). This project is both a mixture of math, and computer science and I thought it was worth sharing here.
Install libmaths on PyPi or from my GitHub: PyPi | GitHub Repo
If you have GitHub account, please star the repository. I'd greatly appreciate it.
Three days ago, I decided to create my own Python library as a 14-year old high school student, libmaths. I've always used them but something I never understood was how they were made or where they were coming from. I did the research on how to design my library and publish it and immediately started. I plan on maintaining the library and dealing with any issues or concerns everyday.
An issue I thought mathematicians faced in programming was the incapability to draw graphs and models in a short period of time within their code. With some research, I gathered a list of functions I wanted to implement to begin with. I have no calculus experience but I was determined to add a couple calculus functions. I needed a lot of help to understand the math and google came pretty clutch.
libmaths is an extremely efficient library allowing the user a smooth experience in graphing and modeling functions. From linear functions all the way to sextic functions and much more, libmaths has it all.
In the GitHub repository, examples for every single function are provided as well as the file itself if you would like to play around with the values or change code yourself.
If there's one thing I learned from this experience, it's that math and computer science put together can be an amazing tool and there's no limit to how much you can learn with the internet.
To anyone trying to pursue coding, there's plenty of resources on the internet and considering we are already in the r/Python subreddit, you can also put math to use in your code!
Example showing one of the many functions available in libmaths!