By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
445,812 Members | 1,288 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 445,812 IT Pros & Developers. It's quick & easy.

Getting started with Scipy/NumPy

P: n/a
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
Share this Question
Share on Google+
1 Reply


P: n/a
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.