[SciPy-dev] Constants in Scipy

Gael Varoquaux gael.varoquaux@normalesup....
Sat Nov 28 16:31:58 CST 2009


On Sat, Nov 28, 2009 at 10:50:37AM +0000, Arkapravo Bhaumik wrote:
>    I had been trying to evaluate euler-gamma in Scipy, which is easy
>    [1]http://3chevrons.blogspot.com/2009/10/eulers-gamma.html . However,
>    MATLAB in comparison has euler-gamma built-into it and intelligently
>    recognises the expression as it is typed in, Scipy is not yet able to do
>    so. If the desire is indeed to make Scipy into a dynamic and robust
>    software then various constants must be built-into the software and Scipy
>    made to identify such expressions.

Interative work is more the resort of IPython, as other people have
replied before. If you have a recent version of IPython installed, as
well as scientific Python, you can do:

In [1]: import ipy_constants as C

In [2]: T = 1 s

In [3]: C.h_bar /T
Out[3]: 1.055E-34 J

In other words, you have a lot of dimensioned constants installed
already.

Gaël


More information about the SciPy-Dev mailing list