473,382 Members | 1,576 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,382 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 8021
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: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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: 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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.