physipy: make python unit-aware

Part 1: physipy brings meter and Joule to python

9 min read

10 hours ago

Have you ever done engineering/scientific computation with Python, and ended up lost or confused about which unit your variable was expressed in, like “is that the value in meters or millimeters”? Or you realized that at some point you added an electrical current with a resistance — which is impossible? As every physics teacher has said at some point: you cannot add carrots and tomatoes.

Well, physipy is here exactly to solve those kinds of problems.

Photo by Artturi Jalli on Unsplash

Table of content:

· What is physipy?
·
Understanding physipy, an example at a time
Computing body-mass-index BMI with physipy
Newton’s law of motion with numpy array
Ohm’s Law with NumPy functions
Einstein’s Mass-Energy Equivalence for common particles, with favunit
Free-fall with built-in favunit
Plotting an object position and speed with Matplotlib
· Wrapup

All images by author.

What is physipy?