[SciPy-user] Does Scipy or Numpy have contemporary physical constants?
Wed Jun 4 20:04:05 CDT 2008
2008/6/4 HuiChang MOON <email@example.com>:
> Hello, users.
> A lot of physical constants such as elementary charge and Planck's constant
> is used to make some physical calculations.
> It is annoying to define the constants so often.
> Does Numpy or Scipy include some physical constants?
No, unfortunately. I has been discussed from time to time, and the
conclusion is that they're not very useful without an automatic
unit-tracking system. Such a system does exist, and it provides
standard constants; it's in Scientific (a slightly dusty package
somewhat complementary to scipy). There is even some support for units
built into ipython, though personally I don't use it.
The biggest limitation of the unit-tracking system is that it doesn't
really work with arrays. There are definitely applications for a
subclass of ndarray that keeps track of units, but I don't know of a
publicly-released one. For pocket-calculator type calculations,
Scientific is pretty handy.
More information about the SciPy-user