473,417 Members | 1,566 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,417 software developers and data experts.

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 8025
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: nitro | last post by:
Hi, I am using a Debian system. I installed NumPy and everything works well. When I try to install SciPy, I get the following error. Any help would be appreciated. ===...
2
by: robert | last post by:
I'm using latest numpy & scipy. What is this problem ? : RuntimeError: module compiled against version 1000002 of C-API but this version of numpy is 1000009 Traceback (most recent call last):...
18
by: robert | last post by:
Is there a ready made function in numpy/scipy to compute the correlation y=mx+o of an X and Y fast: m, m-err, o, o-err, r-coef,r-coef-err ? Or a formula to to compute the 3 error ranges? ...
4
by: HYRY | last post by:
Why the exec time of test(readdata()) and test(randomdata()) of following program is different? my test file 150Hz10dB.wav has 2586024 samples, so I set randomdata function to return a list with...
1
by: 1960_j | last post by:
I have tried to install numpy and scipy on python 5.2. Using gcc 2.95.3, lapack 3.1.1 and ATLAS 3.6.0. When installin numpy it seems to work but when I try to run test get error no test for numpy....
1
by: a.harrowell | last post by:
Can anyone else not reach scipy.org? Am trying to install scipy and numpy. Further, is there an equivalent of numpy that will install correctly on Python 2.5 on WinVista?
17
by: Besturk.Net Admin | last post by:
Hi.. I am using python with postgresql. And i have a query : aia.execute("SELECT id, w from list") links=aia.fetchall() print links and result (2 million result)
4
by: Richard_Martineau | last post by:
Hello All I wonder if anyone can advise me or has done similar to the following? Basically I've downloaded the Python 2.5.2 source code that builds with Visual Studio 6.0. I've built Python...
1
by: process | last post by:
trying to install PyKF-0.1 (Kalman Filters) http://pykf.sourceforge.net/ I have Numpy, Scipy, Matplotlib installed an have successfully installed other packages using them. $ setup.py
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.