Re: numpy, numarray, or numeric?

2007-02-18 Thread Wensui Liu
mpy works as same as numeric. HTH. On 2/15/07, Christian Convey <[EMAIL PROTECTED]> wrote: > I need to bang out an image processing library (it's schoolwork, so I > can't just use an existing one). But I see three libraries competing > for my love: numpy, numarray, and

Re: numpy, numarray, or numeric?

2007-02-18 Thread Lou Pecora
In article <[EMAIL PROTECTED]>, "RickMuller" <[EMAIL PROTECTED]> wrote: > Use numpy; it is the "officially blessed one" that you refer to. It > has all of the advantages of the other two. > > Numeric was the first library, but it had some drawback

Re: numpy, numarray, or numeric?

2007-02-16 Thread RickMuller
e). But I see three libraries competing > > for my love: numpy, numarray, and numeric. > > > Can anyone recommend which one I should use? If one is considered the > > officially blessed one going forward, that would be my ideal. > > > Thanks, > > Christ

Re: numpy, numarray, or numeric?

2007-02-15 Thread Frank
On Feb 15, 4:40 pm, "Christian Convey" <[EMAIL PROTECTED]> wrote: > I need to bang out an image processing library (it's schoolwork, so I > can't just use an existing one). But I see three libraries competing > for my love: numpy, numarray, and numeric. > >

Re: numpy, numarray, or numeric?

2007-02-15 Thread RickMuller
On Feb 15, 5:40 pm, "Christian Convey" <[EMAIL PROTECTED]> wrote: > I need to bang out an image processing library (it's schoolwork, so I > can't just use an existing one). But I see three libraries competing > for my love: numpy, numarray, and numeric. > >

numpy, numarray, or numeric?

2007-02-15 Thread Christian Convey
I need to bang out an image processing library (it's schoolwork, so I can't just use an existing one). But I see three libraries competing for my love: numpy, numarray, and numeric. Can anyone recommend which one I should use? If one is considered the officially blessed one going for

Speed comparison of Numeric, numarray, numpy

2006-10-21 Thread robert
just a note - some speed comparisons : >>> timeit.Timer('x=a-a*.1','import >>> Numeric;a=Numeric.ones(300,Numeric.Float)').timeit(1) 0.60627370238398726 >>> timeit.Timer('x=a-a*.1','import >>> numarray;a=numarray.ones(3

Re: numeric/numpy/numarray

2006-07-10 Thread Robert Kern
Terry Reedy wrote: > "Alex Martelli" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] >> I'll voice a heretic thought: me, I'm sticking with good old Numeric >> until the situation with the newer packages settles down. > > Not much of a heresy, I think. The numpy site recommends tha

Re: numeric/numpy/numarray

2006-07-10 Thread Terry Reedy
"Alex Martelli" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > I'll voice a heretic thought: me, I'm sticking with good old Numeric > until the situation with the newer packages settles down. Not much of a heresy, I think. The numpy site recommends that *new* users start with nu

Re: numarray

2006-07-06 Thread Claudio Grondi
to post what you have exactly done as the phrase "from import ..." can't be it. Claudio Grondi > > what's the difference between 'import numpy', and "from import numpy *" > > comments... > > thanks > > -bruce > > > -O

Re: numarray

2006-07-04 Thread Robert Kern
bruce wrote: > robert > > i did an > python>>> import numpy > a = array([['q','a'],['w','e']]) > > and it didn't work... > > i used > >>from import numpy * > > and it seems to accept the 'array' word.. .looks like it will work... > > what's the difference between 'import numpy', an

RE: numarray

2006-07-04 Thread bruce
the difference between 'import numpy', and "from import numpy *" comments... thanks -bruce -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Robert Kern Sent: Tuesday, July 04, 2006 9:42 PM To: python-list@python.org Subject: Re: numarra

Re: numarray

2006-07-04 Thread Robert Kern
bruce wrote: > hi... > > i'm trying to find numarray.. i found the numpy on sourceforge and > downloaded/installed.. > > i did a > python>> import numarray > > and got an error... Never just say "I got an error." It tells us nothing. Copy-and-pa

numarray

2006-07-04 Thread bruce
hi... i'm trying to find numarray.. i found the numpy on sourceforge and downloaded/installed.. i did a python>> import numarray and got an error... the docs that i've seen point to the sourceforge area.. but i only see numpy.. which appears to incorporate numarray.. my go

Re: numeric/numpy/numarray

2006-06-14 Thread Alex Martelli
Bryan <[EMAIL PROTECTED]> wrote: ... > so, was Numarray written *before* NumPY, or was it a reimplementation of > NumPy which implies it came *after* NumPy? it seems clear that Numeric is > the old one and i read is not being worked on anymore. so that leaves > Numarray a

Re: numeric/numpy/numarray

2006-06-13 Thread Robert Kern
Bryan wrote: > hi, > > what is the difference among numeric, numpy and numarray? i'm going to start > using matplotlib soon and i'm not sure which one i should use. There's a reasonably complete telling (and up-to-date!) of the history behind these packages

Re: numeric/numpy/numarray

2006-06-13 Thread Dan Christensen
Bryan <[EMAIL PROTECTED]> writes: > on the python wiki > "NumArray is the current reimplementation of NumPy." > http://wiki.python.org/moin/NumArray > > so, was Numarray written *before* NumPY, or was it a reimplementation of > NumPy > which implies it c

Re: numeric/numpy/numarray

2006-06-13 Thread John Hunter
>>>>> "Bryan" == Bryan <[EMAIL PROTECTED]> writes: Bryan> hi, what is the difference among numeric, numpy and Bryan> numarray? i'm going to start using matplotlib soon and i'm Bryan> not sure which one i should use. numpy is th

Re: numeric/numpy/numarray

2006-06-13 Thread Bryan
Ben Sizer wrote: > Bryan wrote: > >> at the end of that page, it says: >> >> "Numarray is another implementation of an arrayobject for Python written >> after >> Numeric and before NumPy. Sponsors of numarray have indicated they will be >> moving t

Re: numeric/numpy/numarray

2006-06-13 Thread Ben Sizer
Bryan wrote: > at the end of that page, it says: > > "Numarray is another implementation of an arrayobject for Python written after > Numeric and before NumPy. Sponsors of numarray have indicated they will be > moving to NumPy as soon as is feasible for them so that eventua

Re: numeric/numpy/numarray

2006-06-13 Thread Bryan
Simon Percivall wrote: > Bryan wrote: >> hi, >> >> what is the difference among numeric, numpy and numarray? i'm going to start >> using matplotlib soon and i'm not sure which one i should use. >> >> >> this page says, "Numarray is a re-

Re: numeric/numpy/numarray

2006-06-13 Thread Ben Sizer
Simon Percivall wrote: > Bryan wrote: > > hi, > > > > what is the difference among numeric, numpy and numarray? i'm going to > > start > > using matplotlib soon and i'm not sure which one i should use. > > Look again at numeric.scipy.org, and

Re: numeric/numpy/numarray

2006-06-13 Thread Simon Percivall
Bryan wrote: > hi, > > what is the difference among numeric, numpy and numarray? i'm going to start > using matplotlib soon and i'm not sure which one i should use. > > > this page says, "Numarray is a re-implementation of an older Python array > module &

numeric/numpy/numarray

2006-06-12 Thread Bryan
hi, what is the difference among numeric, numpy and numarray? i'm going to start using matplotlib soon and i'm not sure which one i should use. this page says, "Numarray is a re-implementation of an older Python array module called Numeric" http://www.stsci.edu/resourc

Re: index of an element in a numarray array

2006-05-12 Thread avharut
thanks alot!! -- http://mail.python.org/mailman/listinfo/python-list

Re: index of an element in a numarray array

2006-05-12 Thread rory . brandybuck
[EMAIL PROTECTED] wrote: > how can i find in an efficient way the index of the last occurrence of > a given element in a numarray array? Something like that: >>> where(arange(100) == 10) (array([10]),) >>> _[-1][-1] 10 Or: >>> your_array = arange(10) >>>

index of an element in a numarray array

2006-05-12 Thread avharut
hello everyone! sorry to disturb you with this, but i really cant find anything suitable about the topic in the numarray documentation. how can i find in an efficient way the index of the last occurrence of a given element in a numarray array? many thanks in advance! -- http://mail.python.org

Re: Dynamically growing numarray array.

2006-03-22 Thread Carl Banks
nce I'd like to operate on each point's coordinates individually, > for speed and ufuncs > numarray fits the bill perfectly, especially since system.coordinates > [4] would return proper vector for a 5th point. > To start, read the coordinates from a text file and add them to o

Re: Dynamically growing numarray array.

2006-03-22 Thread Robert Kern
> Since I'd like to operate on each point's coordinates individually, > for speed and ufuncs > numarray fits the bill perfectly, especially since system.coordinates > [4] would return proper vector for a 5th point. BTW, numpy is replacing numarray, so if you're just get

Dynamically growing numarray array.

2006-03-22 Thread Ivan Vinogradov
nates individually, for speed and ufuncs numarray fits the bill perfectly, especially since system.coordinates [4] would return proper vector for a 5th point. To start, read the coordinates from a text file and add them to our array one by one. Here it gets un-elegant and probably wasteful for a

Numarray - Using Integers Efficiently for Boolean Values

2006-02-16 Thread andrewfelch
on Test of code: >>> import numarray >>> gram.UInt32ToBool(ni) array([1, 0, 0, ..., 0, 0, 0], type=Bool) >>> numarray.all(numarray.equal(n,gram.UInt32ToBool(gram.BoolToUInt32(n 1 >>> n array([1, 0, 0, ..., 0, 0, 0], type=Bool) >>> n.shape (1024,) >&g

Re: a numarray question

2006-02-15 Thread avharut
t(the_array, indx, len(indx) * [5.0,]) """ initial_statements = 'import numarray; the_array = numarray.array(int(1.0e6) * [1.0, 0.0])' t1 = timeit.Timer(first_way, initial_statements) t2 = timeit.Timer(second_way, initial_statements) t3 = timeit.Timer(some_third_way, initial_s

Re: a numarray question

2006-02-15 Thread Bas
I believe it is something like a[a==0] = 5 Note that numarray will eventually be replaced by Scipy/Numpy at some time, but this wouldn't change the basic stuff. Cheers, Bas -- http://mail.python.org/mailman/listinfo/python-list

Re: a numarray question

2006-02-15 Thread Juho Schultz
[EMAIL PROTECTED] wrote: > hello everyone > > would anyone please tell me what is the best (fastest) way of replacing > values in numarray arrays? > > lets say i have an array that may contain 0s, and i just want to get > rid of those 0s by replacing them with another number

a numarray question

2006-02-15 Thread avharut
hello everyone would anyone please tell me what is the best (fastest) way of replacing values in numarray arrays? lets say i have an array that may contain 0s, and i just want to get rid of those 0s by replacing them with another number. what would be the most efficient way to do that? many

Re: Easy way to make Numarray Bool use 1 bit?

2006-02-07 Thread andrewfelch
Ahh, I figured it out. The key is to set up the shapes so they broadcast like an outerproduct, but using bitwise_and as the operation and the second operand as the bit filter. So we temporarily expand each bit to a byte for numarray to be able to use it for dot products. If you use a temporary

Easy way to make Numarray Bool use 1 bit?

2006-02-07 Thread andrewfelch
I need to be able to store thousands of one-million-length bit arrays. The first operations use the & operator. But eventually I must perform an inner product with a one-million-length integer array (summing at all the indices of the integer operand where the boolean operand has a "1"). If I use

Re: Numarray, numeric, NumPy, scpy_core ??!!

2006-01-23 Thread Sébastien Boisgérault
Robert Kern wrote: > Sébastien Boisgérault wrote: > > Robert Kern wrote: > > > >>Sébastien Boisgérault wrote: > >> > >>>By the way, I tried numpy 0.9.4 10 minutes ago and guess > >>>what ? 'eigenvalue' is broken too ... (hangs forever) > >> > >>On what platform? > > > > Linux, Mandriva 2006 (gcc 4

Re: Numarray, numeric, NumPy, scpy_core ??!!

2006-01-23 Thread Sébastien Boisgérault
[EMAIL PROTECTED] wrote: > Robert Kern wrote: > > Sébastien Boisgérault wrote: > > > > > By the way, I tried numpy 0.9.4 10 minutes ago and guess > > > what ? 'eigenvalue' is broken too ... (hangs forever) > > > > On what platform? Are you linking against an optimized BLAS? We can't fix > > anythi

Re: Numarray, numeric, NumPy, scpy_core ??!!

2006-01-23 Thread Robert Kern
Sébastien Boisgérault wrote: > Robert Kern wrote: > >>Sébastien Boisgérault wrote: >> >>>By the way, I tried numpy 0.9.4 10 minutes ago and guess >>>what ? 'eigenvalue' is broken too ... (hangs forever) >> >>On what platform? > > Linux, Mandriva 2006 (gcc 4.0.1, etc.) Okay, my answer then is, "D

Re: Numarray, numeric, NumPy, scpy_core ??!!

2006-01-23 Thread Sébastien Boisgérault
Robert Kern wrote: > Sébastien Boisgérault wrote: > > > By the way, I tried numpy 0.9.4 10 minutes ago and guess > > what ? 'eigenvalue' is broken too ... (hangs forever) > > On what platform? Linux, Mandriva 2006 (gcc 4.0.1, etc.) > Are you linking against an optimized BLAS? Nope -- I tried the ba

Re: Numarray, numeric, NumPy, scpy_core ??!!

2006-01-23 Thread greg . landrum
Robert Kern wrote: > Sébastien Boisgérault wrote: > > > By the way, I tried numpy 0.9.4 10 minutes ago and guess > > what ? 'eigenvalue' is broken too ... (hangs forever) > > On what platform? Are you linking against an optimized BLAS? We can't fix > anything without details. I'll be happy to work

Re: Numarray, numeric, NumPy, scpy_core ??!!

2006-01-22 Thread Tim Hochberg
Szabolcs Nagy wrote: >>Basically all I need is vectors and 3x3 matrices. > > > hmm > is numpy really efficient for 3x3 (or 4x4) matrices and vectors? > > IMHO an optimized matrix4x4 class can be much faster (i'm just guessing > here) > > eg cgtypes is a simple c++ implementation with boost-pyth

Re: Numarray, numeric, NumPy, scpy_core ??!!

2006-01-22 Thread Szabolcs Nagy
> Basically all I need is vectors and 3x3 matrices. hmm is numpy really efficient for 3x3 (or 4x4) matrices and vectors? IMHO an optimized matrix4x4 class can be much faster (i'm just guessing here) eg cgtypes is a simple c++ implementation with boost-python wrapper: http://cgkit.sourceforge.ne

Re: Numarray, numeric, NumPy, scpy_core ??!!

2006-01-22 Thread Robert Kern
Sébastien Boisgérault wrote: > By the way, I tried numpy 0.9.4 10 minutes ago and guess > what ? 'eigenvalue' is broken too ... (hangs forever) On what platform? Are you linking against an optimized BLAS? We can't fix anything without details. I'll be happy to work with you on this bug over on th

Re: Numarray, numeric, NumPy, scpy_core ??!!

2006-01-22 Thread Sébastien Boisgérault
Robert Kern wrote: > J wrote: > > I will just jump in an use NumPy. I hope this one will stick and evolve > > into the mother of array packages. > > How stable is it ? For now I really just need basic linear algebra. > > i.e. matrix multiplication, dot, cross etc Same concern for me. I discovere

Re: Numarray, numeric, NumPy, scpy_core ??!!

2006-01-22 Thread Tom Anderson
On Sat, 21 Jan 2006, Robert Kern wrote: > Tom Anderson wrote: > >> Pardon my failure to RTFM, but does NumPy pick up the vecLib BLAS on Macs? > > Yes. Excellent, thanks. tom -- forget everything from school -- you are programmer -- http://mail.python.org/mailman/listinfo/python-list

Re: Numarray, numeric, NumPy, scpy_core ??!!

2006-01-22 Thread Lawrence Oluyede
"J" <[EMAIL PROTECTED]> writes: > I hope the title of this message indicates my question. I am looking > for basic > array functionality in Python and it turns out that there are all these > packages which > are somehow related. Some are allegedly discontinued but still seem to > get updated. It

Re: Numarray, numeric, NumPy, scpy_core ??!!

2006-01-21 Thread Robert Kern
Tom Anderson wrote: > Pardon my failure to RTFM, but does NumPy pick up the vecLib BLAS on Macs? Yes. -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the grass grows high Are the graves of dreams allowed to die." -- Richard Harter -- http://mail.python.org/mailman/listinfo/p

Re: Numarray, numeric, NumPy, scpy_core ??!!

2006-01-21 Thread Tom Anderson
On Sat, 21 Jan 2006, Travis E. Oliphant wrote: > J wrote: > >> I will just jump in an use NumPy. I hope this one will stick and evolve >> into the mother of array packages. How stable is it ? For now I really >> just need basic linear algebra. i.e. matrix multiplication, dot, cross >> etc > > T

Re: Numarray, numeric, NumPy, scpy_core ??!!

2006-01-21 Thread Travis E. Oliphant
J wrote: > I will just jump in an use NumPy. I hope this one will stick and evolve > into the mother of array packages. > How stable is it ? For now I really just need basic linear algebra. > i.e. matrix multiplication, dot, cross etc > There is a new release coming out this weekend. It's close

Re: Numarray, numeric, NumPy, scpy_core ??!!

2006-01-21 Thread Robert Kern
J wrote: > I will just jump in an use NumPy. I hope this one will stick and evolve > into the mother of array packages. > How stable is it ? For now I really just need basic linear algebra. > i.e. matrix multiplication, dot, cross etc That stuff isn't going to change on you. -- Robert Kern [EMAI

Re: Numarray, numeric, NumPy, scpy_core ??!!

2006-01-21 Thread J
I will just jump in an use NumPy. I hope this one will stick and evolve into the mother of array packages. How stable is it ? For now I really just need basic linear algebra. i.e. matrix multiplication, dot, cross etc Cheers -- http://mail.python.org/mailman/listinfo/python-list

Re: Numarray, numeric, NumPy, scpy_core ??!!

2006-01-21 Thread Robert Kern
J wrote: > Ok, I will look at NumPy ... > > I have another question about performance. Are the array operations > such as matrix multiplication implemented in > python or in C ? I was under the impression that the function calls in > numarray are only wrappers to C code, but

Re: Numarray, numeric, NumPy, scpy_core ??!!

2006-01-21 Thread J
Ok, I will look at NumPy ... I have another question about performance. Are the array operations such as matrix multiplication implemented in python or in C ? I was under the impression that the function calls in numarray are only wrappers to C code, but now I suspect that matrix multiplicaiton

Re: Numarray, numeric, NumPy, scpy_core ??!!

2006-01-21 Thread Colin J. Williams
pdated. Could we start a discussion about which package will or > may or should survive ? > > I started to use numarray, but I have a bug that I just cannot find a > solution for, so I started > to look around again. Basically I want to provide scripting support to > a graphics engin

Re: Numarray, numeric, NumPy, scpy_core ??!!

2006-01-20 Thread Robert Kern
Claudio Grondi wrote: > I decided to use numarray, so maybe you can report what your problem/bug > is before I run into it myself? The reason why I decided to use numarray > was, that the whole scpy_core story seems to get more or less commercial > and its free version comes bec

Re: Numarray, numeric, NumPy, scpy_core ??!!

2006-01-20 Thread Robert Kern
J wrote: > Hi > > I hope the title of this message indicates my question. I am looking > for basic > array functionality in Python and it turns out that there are all these > packages which > are somehow related. Some are allegedly discontinued but still seem to > get updated. Could we start a dis

Re: Numarray, numeric, NumPy, scpy_core ??!!

2006-01-20 Thread Claudio Grondi
pdated. Could we start a discussion about which package will or > may or should survive ? > > I started to use numarray, but I have a bug that I just cannot find a > solution for, so I started > to look around again. Basically I want to provide scripting support to > a graphics engin

Numarray, numeric, NumPy, scpy_core ??!!

2006-01-20 Thread J
package will or may or should survive ? I started to use numarray, but I have a bug that I just cannot find a solution for, so I started to look around again. Basically I want to provide scripting support to a graphics engine. All the matrices and vectors are in C++ and all I want to do is provide an

Re: numarray :: multiplying all the elements in 1d array

2005-12-21 Thread Tim Hochberg
Mandus wrote: > Tue, 20 Dec 2005 19:32:13 +0530 skrev Suresh Jeevanandam: > >>Hi all, >> Lets say I have an array: >> from numarray import * >> a = array([ 6, 7, 8, 9, 10, 11, 12]) >> >> I want to multiply out all the elements an

Re: numarray :: multiplying all the elements in 1d array

2005-12-20 Thread Robert Kern
Suresh Jeevanandam wrote: > Hi all, > Lets say I have an array: > from numarray import * > a = array([ 6, 7, 8, 9, 10, 11, 12]) > > I want to multiply out all the elements and get the result. > > r = 1.0 > for i in

Re: numarray :: multiplying all the elements in 1d array

2005-12-20 Thread Mandus
Tue, 20 Dec 2005 19:32:13 +0530 skrev Suresh Jeevanandam: > Hi all, > Lets say I have an array: > from numarray import * > a = array([ 6, 7, 8, 9, 10, 11, 12]) > > I want to multiply out all the elements and get the result. > > r

numarray :: multiplying all the elements in 1d array

2005-12-20 Thread Suresh Jeevanandam
Hi all, Lets say I have an array: from numarray import * a = array([ 6, 7, 8, 9, 10, 11, 12]) I want to multiply out all the elements and get the result. r = 1.0 for i in a: r = r*i Is there any faster, efficient

cannot install numarray

2005-11-18 Thread Andi Petculescu
Hi, I'm trying to install numarray 1.4.1 on Darwin. When I run "python setup.py install", everything seems to work until an error message appears saying that there is no gcc. I installed gcc-4.0 from the X11 package that came with Mac OS-X. unable to execute gcc: No such fi

numarray / gcc woes on Darwin

2005-11-16 Thread Andi Petculescu
Hi all, I am a new convert to Mac OSX. I want to start using python under darwin and I need to install numarray. I've downloaded and extracted "numarray-1.4.1" in the python folder, installed gcc 4.0 from the OSX disc. When I run "python setup.py install" i still get an

Re: need an example of Python numarray to C++ and back again, Boost / SWIG?

2005-11-10 Thread Fernando Perez
ar it" > > I've previously looked at Phillip Austin's 'num_util' and Paulo J. S. > Silva's 'COIN' example, but even from those two, I can't figure out a > way to do: Python 2D numarray --> C++ (process array) --> Python 2D > numarr

Re: need an example of Python numarray to C++ and back again, Boost / SWIG?

2005-11-10 Thread PL
viously looked at Phillip Austin's 'num_util' and Paulo J. S. Silva's 'COIN' example, but even from those two, I can't figure out a way to do: Python 2D numarray --> C++ (process array) --> Python 2D numarray. I forgot about "weave" - I had looked ther

Re: need an example of Python numarray to C++ and back again, Boost / SWIG?

2005-11-09 Thread Fernando Perez
PL wrote: > I want to pass a 2D array from Python to C++, manipulate it in C++ (for > example, add 1 to each element) and pass it back to Python. > > With these building blocks I will be able to figure out all the rest of > what I need to do for my project. I am very familiar with Python, but >

need an example of Python numarray to C++ and back again, Boost / SWIG?

2005-11-09 Thread PL
I want to pass a 2D array from Python to C++, manipulate it in C++ (for example, add 1 to each element) and pass it back to Python. With these building blocks I will be able to figure out all the rest of what I need to do for my project. I am very familiar with Python, but less so with C++ and Bo

Re: Should i pick up Numeric, Numarray or SciPy.core?

2005-10-21 Thread Robert Kern
jelle wrote: > #No rant intended > > I'm not at all confused wether I should learn an one of the advanced > array modules, I'm slightly confused over which I should pick up. I'm > impressed with the efforts of SciPy and Scientific, but since I'm > fairly new

Should i pick up Numeric, Numarray or SciPy.core?

2005-10-21 Thread jelle
#No rant intended I'm not at all confused wether I should learn an one of the advanced array modules, I'm slightly confused over which I should pick up. I'm impressed with the efforts of SciPy and Scientific, but since I'm fairly new to programming & OO, choosing Numarray

Re: MemoryError Numarray

2005-09-26 Thread Robert Kern
Bernhard Reimar Hoefle wrote: > I have the following python script: > ### > from numarray import * > > while 1: > a=arange(1,3) > b=a*100/100 > del a > del b > ##

MemoryError Numarray

2005-09-26 Thread Bernhard Reimar Hoefle
I have the following python script: ### from numarray import * while 1: a=arange(1,3) b=a*100/100 del a del b ### This script crashes after a few minutes with an error: MemoryError

Re: Problem with Help when using numarray

2005-09-16 Thread Colin J. Williams
Fredrik Lundh wrote: > Colin J. Williams wrote: > > >>With numarray, help gives unhelpful responses: >> >>import numarray.numarraycore as _n >>c= _n.array((1, 2)) >>print 'rank Value:', c.rank >>print 'c.rank Help:', help(c.rank)

Re: Problem with Help when using numarray

2005-09-16 Thread Fredrik Lundh
Colin J. Williams wrote: > With numarray, help gives unhelpful responses: > > import numarray.numarraycore as _n > c= _n.array((1, 2)) > print 'rank Value:', c.rank > print 'c.rank Help:', help(c.rank) c.rank returns a Python integer object. if you pass in

Re: Problem with Help when using numarray

2005-09-16 Thread Robert Kern
Colin J. Williams wrote: > Python advertises some basic service: > > C:\Python24>python > Python 2.4.1 (#65, Mar 30 2005, 09:13:57) [MSC v.1310 32 bit (Intel)] on > win32 > Type "help", "copyright", "credits" or "license" for more

Problem with Help when using numarray

2005-09-16 Thread Colin J. Williams
Python advertises some basic service: C:\Python24>python Python 2.4.1 (#65, Mar 30 2005, 09:13:57) [MSC v.1310 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> With numarray, help gives unhe

Re: help for conversion of NUMARRAY to PIL object

2005-09-16 Thread A. L.
Sorry, I make the mistakes. I have known how to use to/fromstring method to interface between PIL and Numarray. And your code does work. Another question. Just like the code you provide, is it possible to directly load image data from PIL to Numarray array without use of to/fromstring method

Re: help for conversion of NUMARRAY to PIL object

2005-09-15 Thread Robert Kern
inly does on my machine. Is it raising an exception on yours? If so, please post the code that is causing the error and the exception that is raised and the versions of PIL and numarray that you are using. -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the grass grows high

Re: help for conversion of NUMARRAY to PIL object

2005-09-15 Thread A. L.
Thanks. But some problems remain. I have known using Image.tostring/fromstring and numarray.tostring/fromstring can do the job. But when confronting multi-spectral images, e.g., RGB color images, I don't know how to do it. Could you give some advices on that? You wrote "In [14]: img = Image.fromb

Re: help for conversion of NUMARRAY to PIL object

2005-09-15 Thread Robert Kern
A. L. wrote: > hi, everybody here, > > I am a newbie to python. I encounter a problem that how to convert > an array of numarray to pil object. For example, the data in an image > is extracted using Image.getdata, then the data are converted into an > array in numarray. But

help for conversion of NUMARRAY to PIL object

2005-09-15 Thread A. L.
hi, everybody here, I am a newbie to python. I encounter a problem that how to convert an array of numarray to pil object. For example, the data in an image is extracted using Image.getdata, then the data are converted into an array in numarray. But when the array is needed to convert to the

Re: looping over arrays in numarray/numeric

2005-09-09 Thread Robert Kern
proof wrote: > a = range(100) > b = [a] * 3 > > b[1] = [k + i for k, i in zip(b[1], b[2])] > > This is rather slow in python and I thought that kind of things should > be written using numeric or numarray. I tried to read trough manuals > but it didn't help

looping over arrays in numarray/numeric

2005-09-09 Thread proof
a = range(100) b = [a] * 3 b[1] = [k + i for k, i in zip(b[1], b[2])] This is rather slow in python and I thought that kind of things should be written using numeric or numarray. I tried to read trough manuals but it didn't help me. So how is this done using numeric or numarray? --

Re: bug in numarray?

2005-09-09 Thread Colin J. Williams
Xiangyi wrote: > Hi, there, > > I got the following segmentation fault. > >> from numarray import * >> a = zeros((5,100), Float64) >> b = kroneckerproduct(a, identity(12)) >> segmentation fault > > > If I use a = zeros((5,100)), everything is fine

Re: record sound to numarray/list

2005-09-08 Thread [EMAIL PROTECTED]
No there is not. Hey, you could write one though. -- http://mail.python.org/mailman/listinfo/python-list

record sound to numarray/list

2005-09-08 Thread rubbishemail
Hello, do you know any way to record a sound from the soundcard on winXP to a numarray? many thanks Daniel -- http://mail.python.org/mailman/listinfo/python-list

Re: bug in numarray?

2005-09-07 Thread Terry Reedy
"Xiangyi" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > I got the following segmentation fault. >> from numarray import * >> a = zeros((5,100), Float64) >> b = kroneckerproduct(a, identity(12)) >> segmentation fault > > If I us

Re: bug in numarray?

2005-09-07 Thread [EMAIL PROTECTED]
python 2.4.1 numarray 1.3.1 works ok here. I'd try numarray 1.3.1 and see if it is unique to your version. Also, if you built it yourself, you might make sure you have sane CFLAGS. [EMAIL PROTECTED] ~ $ python Python 2.4.1 (#1, Sep 3 2005, 16:55:52) [GCC 3.4.4 (Gentoo 3.4.4-r1, ssp-3.4.

Re: bug in numarray?

2005-09-07 Thread Robert Kern
Xiangyi wrote: > Hi, there, > > I got the following segmentation fault. > >>from numarray import * >>a = zeros((5,100), Float64) >>b = kroneckerproduct(a, identity(12)) >>segmentation fault > > If I use a = zeros((5,100)), everything is fine. Kind

bug in numarray?

2005-09-07 Thread Xiangyi
Hi, there, I got the following segmentation fault. > from numarray import * > a = zeros((5,100), Float64) > b = kroneckerproduct(a, identity(12)) > segmentation fault If I use a = zeros((5,100)), everything is fine. Kind of weird! Can someone help me figure it out? BTW, the pytho

Re: bug in python/numarray

2005-08-02 Thread Xiangyi
Robert and Terry- Thank you so much for helping me on this! Yes, it's a problem due to an old version of numarray. I didn't realize that my windows has a much newer version than the debian machine. Best, Xiangyi - Original Message - From: "Robert Kern" <[EMAI

Re: bug in python/numarray

2005-08-02 Thread Robert Kern
e the following error while > running it in debian: > Traceback (most recent call last): >File "", line 1, in ? > File "/usr/lib/python2.4/site-packages/numarray/numarraycore.py", line > 1137, in mean > return self.sum()/(self.nelements()*1.0) >

Re: bug in python/numarray

2005-08-02 Thread Terry Reedy
especially with different amounts of memory. > Traceback (most recent call last): > File "", line 1, in ? > File "/usr/lib/python2.4/site-packages/numarray/numarraycore.py", line > 1137, in mean > return self.sum()/(self.nelements()*1.0) > File "/usr/

bug in python/numarray

2005-08-02 Thread meng
recent call last): File "", line 1, in ? File "/usr/lib/python2.4/site-packages/numarray/numarraycore.py", line 1137, in mean return self.sum()/(self.nelements()*1.0) File "/usr/lib/python2.4/site-packages/numarray/numarraycore.py", line 1133, in su

Re: ImportError: No module named numarray

2005-07-11 Thread Robert Kern
ot;C:\Python24\toky.py", line 1, in -toplevel- > from nltk.probability import ConditionalFreqDist > File "C:\Python24\Lib\site-packages\nltk\probability.py", line 56, > in -toplevel- > import types, math, numarray > ImportError: No module named n

ImportError: No module named numarray

2005-07-11 Thread enas khalil
uot;C:\Python24\Lib\site-packages\nltk\probability.py", line 56, in -toplevel-    import types, math, numarrayImportError: No module named numarray can you please tell me the cause Sell on Yahoo! Auctions - No fees. Bid on great items.-- http://mail.python.org/mailman/listinfo/python-list

Re: ImportError: No module named numarray

2005-07-09 Thread Robert Kern
level- > from nltk.probability import ConditionalFreqDist > File "C:\Python24\Lib\site-packages\nltk\probability.py", line 56, in > -toplevel- > import types, math, numarray > ImportError: No module named numarray Install numarray. http://www.stsci.edu/resources/s

ImportError: No module named numarray

2005-07-09 Thread enas khalil
t  File "C:\Python24\Lib\site-packages\nltk\probability.py", line 56, in -toplevel-    import types, math, numarrayImportError: No module named numarray   thanks __Do You Yahoo!?Tired of spam? Yahoo! Mail has the best spam protection around h

  1   2   >