469,578 Members | 1,731 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,578 developers. It's quick & easy.

Getting started with Scipy/NumPy

I installed SciPy and NumPy (0.9.5, because 0.9.6 does not work with
the current version of SciPy), and had some teething troubles. I looked
around for help and observed that the tutorial is dated October 2004,
and is not as thorough as Python's documentation. Is there an
alternative source of information that lists all the functions and
their usage?

I tried using scipy.info to get information on the std function in the
stats libary, and ran into the following problem.

x = [1, 2, 3, 4]
import scipy
scipy.std(x) 1.2909944487358056
scipy.info(std)
Traceback (most recent call last):
File "<pyshell#6>", line 1, in -toplevel-
scipy.info(std)
NameError: name 'std' is not defined
scipy.info(stats)
Traceback (most recent call last):
File "<pyshell#7>", line 1, in -toplevel-
scipy.info(stats)
NameError: name 'stats' is not defined
scipy.info(stats.std)
Traceback (most recent call last):
File "<pyshell#11>", line 1, in -toplevel-
scipy.info(stats.std)
NameError: name 'stats' is not defined

However, If I redo the import as follows I can get help on std: from scipy import *
info(std) std(a, axis=0, dtype=None)

None


Question: why did it work this time and not on my first attempt?

Thanks in advance

Thomas Philips

Mar 15 '06 #1
1 6211
tk****@hotmail.com wrote:
I installed SciPy and NumPy (0.9.5, because 0.9.6 does not work with
the current version of SciPy), and had some teething troubles. I looked
around for help and observed that the tutorial is dated October 2004,
and is not as thorough as Python's documentation. Is there an
alternative source of information that lists all the functions and
their usage?
http://www.scipy.org/doc/api_docs/
I tried using scipy.info to get information on the std function in the
stats libary, and ran into the following problem.
x = [1, 2, 3, 4]
import scipy
scipy.std(x)
1.2909944487358056
scipy.info(std)
Traceback (most recent call last):
File "<pyshell#6>", line 1, in -toplevel-
scipy.info(std)
NameError: name 'std' is not defined


You would need to do

scipy.info(scipy.std)
scipy.info(stats)
Traceback (most recent call last):
File "<pyshell#7>", line 1, in -toplevel-
scipy.info(stats)
NameError: name 'stats' is not defined
scipy.info(stats.std)
Traceback (most recent call last):
File "<pyshell#11>", line 1, in -toplevel-
scipy.info(stats.std)
NameError: name 'stats' is not defined

However, If I redo the import as follows I can get help on std:
from scipy import *
info(std)


std(a, axis=0, dtype=None)

None

Question: why did it work this time and not on my first attempt?


Because you did a different kind of import on the second attempt.

--
Robert Kern
ro*********@gmail.com

"I have come to believe that the whole world is an enigma, a harmless enigma
that is made terrible by our own mad attempt to interpret it as though it had
an underlying truth."
-- Umberto Eco

Mar 15 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

7 posts views Thread by nitro | last post: by
2 posts views Thread by robert | last post: by
18 posts views Thread by robert | last post: by
4 posts views Thread by HYRY | last post: by
1 post views Thread by 1960_j | last post: by
1 post views Thread by a.harrowell | last post: by
17 posts views Thread by Besturk.Net Admin | last post: by
4 posts views Thread by guiromero | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.