On the scipy user list, this exac question appeared last month, so yu can
check the answers on the archive :)
Matthieu
2007/3/2, Stephen Kelly <[EMAIL PROTECTED]>:
Hi,
I'm working on a project that requires interpolation, and I found this
post (http://mail.python.org/pipermail/python-list/200
There is numpy.linalg.norm.
Here's what it does:
def norm(x, ord=None):
x = asarray(x)
nd = len(x.shape)
if ord is None: # check the default case first and handle it immediately
return sqrt(add.reduce((x.conj() * x).ravel().real))
if nd == 1:
if ord == Inf:
Howdy Folks,
I was missing the good ole days of using Matlab back at the Uni when I
could debug my code, stop at breakpoints and plot various data without
fear of blocking the interpreter process.
Using "ipython -pylab" is what has been suggested to me in the past,
but the problem is I don't do m
Hi,
> Hi, guys.
>
> I'm trying to install numpy from subversion on my Powerbook 12", from
> a fresh install (Mac OS X 10.4.8). I downloaded the official universal
> Python 2.5 from python.org, and installed GCC
> (powerpc-apple-darwin8-gcc-4.0.0) from XCode.
>
> Installation fails with the message:
Hi all,
just a quick (and easy?) question.
what is the best (fastest) way to implement the euclidean norm of a vector,
i.e. the function:
import scipy as S
def norm(x):
"""normalize a vector."""
return S.sqrt(S.sum(S.absolute(x)**2))
?
thanks in advance,
Lorenzo.
___
Well, there were no responses to my earlier email proposing changes to
numpy.bincount() to make it faster and more flexible. Does this mean
noone is using bincount? :-)
Anyway I've now made the proposed modifications and got substantial
speedups of 3-10. Details are in this extract from my C co
Christopher Ball wrote:
> In Python, a/0 gives a divide-by-zero error for any a, but in numpy, I
> can ignore divide-by-zero errors. If I do this, why can't I still have
> 0/0 be nan?
>
> seterr(divide='ignore')
> a=array([0],dtype=float_)
> b=array([0],dtype=float_)
> divide(a,b)
>
> gives na
Haw-Jye Shyu wrote:
> Hi Folks:
>
> On the second try, I use the Python Shell to open a file named
> C:\Python25\Lib\site-package\numpy\setup.py
>
> and run it on the Pythono Shell.
Don't. It's not useful once installed. It's just for building from source.
--
Robert Kern
"I have come to belie
Haw-Jye Shyu wrote:
> Hi folks:
>
> How are you?
> I am a newbie to the Numpy. Today, I have downloaded
> numpy-1.0.1.win32-py2.5.exe
> from the web site of
> http://sourceforge.net/project/showfiles.php?group_id=1369&package_id=175103
>
> I double clicked on the numpy-1.0.1.win32-py2.5.exe an
> Thank you both for your replies - the difference is clear to me now.
Actually, sorry, I'm still confused!
If I want to be able to have a/0 be inf (for a!=0), then why does that
stop 0/0 from being nan?
In Python, a/0 gives a divide-by-zero error for any a, but in numpy, I
can ignore divid
Hello,
After running a simulation that took 6 days to complete, my script
proceeded to attempt to write the results out to a file, pickled.
The operation failed even though there was 1G of RAM free (4G machine).
I've since reconsidered using the pickle format for storing data sets
that include
I, for one, would also like this. Perhaps it should not be called
'rand', however, as that conflicts with the pylab rand. (numpy load
and pylab load also conflict -- probably the only reason I ever use
import pylab as pl in my scripts). 'random' is already taken by the
whole package...
Mark P. Miller wrote:
>Robert: Just a thought on this topic:
>
>Would it be possible for the Scipy folks to add a new module based
>solely off your old mtrand code (pre-broadcast)? I have to say that the
>mtrand code from numpy 0.9.8 has some excellent advantages over the core
>python random
Hi Folks:
On the second try, I use the Python Shell to open a file named
C:\Python25\Lib\site-package\numpy\setup.py
and run it on the Pythono Shell. I got the following message:
Python 2.5 (r25:51908, Sep 19 2006, 09:52:17) [MSC v.1310 32 bit (Intel)] on
win32
Type "copyright", "credits" or "l
Hi folks:
How are you?
I am a newbie to the Numpy. Today, I have downloaded numpy-1.0.1.win32-py2.5.exe
from the web site of
http://sourceforge.net/project/showfiles.php?group_id=1369&package_id=175103
I double clicked on the numpy-1.0.1.win32-py2.5.exe and the installation seems
to run smooth
On Mar 10, 3:30 pm, "Steven H. Rogers" <[EMAIL PROTECTED]> wrote:
> Thanks to all who responded to my question about teaching array
> programming. I've compiled a brief summary of the responses.
Fortran 90 and 95 can and are being used to teach "array programming",
since the language allows opera
On Mar 10, 3:30 pm, "Steven H. Rogers" <[EMAIL PROTECTED]> wrote:
> Thanks to all who responded to my question about teaching array
> programming. I've compiled a brief summary of the responses.
Fortran 90 and later versions of the language can be used to teach
"array programming", since the lang
Hi All,
I have a set of large arrays to which I have to do exp functions
over and over again. I am wondering if there is any benefit to
teaching numpy how to use the vForce frameworks to do this function.
Does anyone have experience hacking the source to get numpy to use
sys
I have problem to install numarray on cygwin. I have seen emails on that
topic but I finally do not have a solution.
Below is the error message for numarray-1.5.2 on python 2.4.3. I am
using numarray instead of numpy because I need the module to be
compatible with a software : MAT (Model-based
I am trying to use scipy optimize module but I am having problem when
I try to import it:
>>> import numpy
>>> import scipy
>>> from scipy import optimize
Traceback (most recent call last):
File "", line 1, in ?
File "/Library/Frameworks/Python.framework/Versions/2.4/lib/
python2.4/site-packag
Although I don't teach, I did use NumPy for coding in a grad level CFD
course. I found much nicer to use than MATLAB. As the codes get more
complex you can introduce code profiling and inline C or FORTRAN. The
Python syntax is so clean, you spend more time on the algorithm, less
on the syntax.
On
Hi,
I'm working on a project that requires interpolation, and I found this
post (http://mail.python.org/pipermail/python-list/2000-August/050462.html
) which works fine on my linux box (which seems to have Numeric
installed), but does not work on my windows platform because the
arrayfns module doe
Good evening,
Earlier this evening we had a network outage due to a network equipment
malfunction. This outage prevented access to the Enthought and SciPy servers
from about 8:45-10pm CDT. I have fixed the problem and everything should be
back to normal.
I apologize for the inconvenience.
Jeff
23 matches
Mail list logo