473,670 Members | 2,327 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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.2909944487358 056
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(stat s)
Traceback (most recent call last):
File "<pyshell#7 >", line 1, in -toplevel-
scipy.info(stat s)
NameError: name 'stats' is not defined
scipy.info(stat s.std)
Traceback (most recent call last):
File "<pyshell#1 1>", line 1, in -toplevel-
scipy.info(stat s.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 8067
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.2909944487358 056
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(scip y.std)
scipy.info( stats)
Traceback (most recent call last):
File "<pyshell#7 >", line 1, in -toplevel-
scipy.info(stat s)
NameError: name 'stats' is not defined
scipy.info( stats.std)
Traceback (most recent call last):
File "<pyshell#1 1>", line 1, in -toplevel-
scipy.info(stat s.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*********@gma il.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
3048
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. === idf@server1:~/scipy/scipy-0.4.4$ python setup.py install import core -> failed: /usr/lib/python2.3/site-packages/numpy/core/multiarray.so: undefined
2
3934
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): File "<interactive input>", line 1, in ? File "C:\PYTHON23\Lib\site-packages\scipy\stats\__init__.py", line 7, in ? from stats import * File "C:\PYTHON23\Lib\site-packages\scipy\stats\stats.py", line 191, in ? import scipy.special as special File...
18
22387
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? -robert PS: numpy.corrcoef computes only the bare coeff:
4
2813
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 2586024 samples. the exec result is: 2586024 <type 'list'> 10.8603842736 2586024
1
1607
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. When I try to Install scipy only get error. Any ideas on how to install would be appreciated. Thanks
1
1660
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
2419
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
2122
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 for windows. This was easy (it even came with the pcbuild.dsw workspace file). Great! Now comes the troubled bit...I now look for similar source code for Python extensions Numpy and Scipy but the source code and directories
1
2671
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
8471
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8388
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8663
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7423
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6218
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5687
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4396
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2804
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2046
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.