Re: [Numpy-discussion] NumPy 1.0.3 released

2007-05-23 Thread Travis Oliphant
dmitrey wrote: > When I try to install numpy from sourses, either 1.0.2 or 1.0.3, I > always get > the debugged program raised the exception unhandled > ".../site-packages/numpy/core/multiarray.so: > undefined symbol: PyUnicodeUCS2_FromUnicode" > File: /usr/local/lib/python2.5/site-packages/numpy/

Re: [Numpy-discussion] NumPy 1.0.3 released

2007-05-23 Thread dmitrey
When I try to install numpy from sourses, either 1.0.2 or 1.0.3, I always get the debugged program raised the exception unhandled ".../site-packages/numpy/core/multiarray.so: undefined symbol: PyUnicodeUCS2_FromUnicode" File: /usr/local/lib/python2.5/site-packages/numpy/core/__init__.py. Line: 5

[Numpy-discussion] numpy testing

2007-05-23 Thread Brian Hawthorne
Hello, I'm having a bit of trouble with numpy testing not finding my tests. It seems like a bug, but maybe it's a subtle feature. I constructed the simplest possible straw man to illustrate my problem (attached as foo.tgz). The directory structure looks like this: a/ __init__.py foo.py tests

[Numpy-discussion] Six-legged feature in median function

2007-05-23 Thread Mike Ressler
Bumped into the following in numpy-1.0.2 and 1.0.3 (of course :-) on both 32-bit and 64-bit linux boxes: >>> import numpy as nm >>> a=nm.zeros(100,dtype='Int32')-3 >>> nm.median(a) -3.0 >>> a=nm.zeros(100,dtype='Int16')-3 >>> nm.median(a) Warning: overflow encountered in short_

Re: [Numpy-discussion] NumPy 1.0.3 released

2007-05-23 Thread Albert Strasheim
On Wed, 23 May 2007, Travis Oliphant wrote: > I'm pleased to announce the release of NumPy 1.0.3 > > Hopefully, this release will work better with multiple interpreters as > well as having some significant bugs fixed. Great stuff. Could you (or someone) please take care of the last 4 active ti

[Numpy-discussion] NumPy 1.0.3 released

2007-05-23 Thread Travis Oliphant
I'm pleased to announce the release of NumPy 1.0.3 Hopefully, this release will work better with multiple interpreters as well as having some significant bugs fixed. Other changes include * x/y follows Python standard on mixed-sign division * iinfo added to provide information on integer data-

Re: [Numpy-discussion] numpy and freeze.py

2007-05-23 Thread Travis Oliphant
Hanno Klemm wrote: > Hi, > > I want to use freeze.py on code that heavily relies on numpy. If I > just try > > python2.5 /scratch/src/Python-2.5/Tools/freeze/freeze.py pylay.py > I've seen people use NumPy with programs like freeze before. You have to take into account that multiarray is a co

Re: [Numpy-discussion] norm in scipy.linalg but not numpy?

2007-05-23 Thread dmitrey
Ok, I have made the changes. Robert Kern wrote: > dmitrey wrote: > >> Robert Kern wrote: >> >>> Go for it. >>> >>> >> I'm sorry, I don't know how to edit the page and I guess I haven't >> enough permissions. >> > > Create an account here: > > http://www.scipy.org/UserPrefere

Re: [Numpy-discussion] norm in scipy.linalg but not numpy?

2007-05-23 Thread Robert Kern
dmitrey wrote: > Robert Kern wrote: >> Go for it. >> > I'm sorry, I don't know how to edit the page and I guess I haven't > enough permissions. Create an account here: http://www.scipy.org/UserPreferences -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless e

Re: [Numpy-discussion] norm in scipy.linalg but not numpy?

2007-05-23 Thread dmitrey
Robert Kern wrote: > Go for it. > > I'm sorry, I don't know how to edit the page and I guess I haven't enough permissions. D. ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] More scalar math issues

2007-05-23 Thread Travis Oliphant
Erin Sheldon wrote: >y=x.copy() >N.cos(x,y) > but wouldn't it be better to just preserve the type through functions > like cos? Or does this cause repercussions in other places? > This causes repercussions in other places. This can be re-visited for 1.1, but for now, all ufuncs that

[Numpy-discussion] More scalar math issues

2007-05-23 Thread Erin Sheldon
Hi all- The types of objects are not preserved through mathematical operations when numpy scalars are involved. This has been discussed on this list before. I think the following error is problematic, however. >>> x=N.array(0.1) >>> type(x) >>> y = N.cos(x) # the type has changed >>> type(y)

Re: [Numpy-discussion] Question about flags of fancy indexed array

2007-05-23 Thread Travis Oliphant
Charles R Harris wrote: > > > On 5/23/07, *Albert Strasheim* <[EMAIL PROTECTED] > > wrote: > > Hello all > > On Wed, 23 May 2007, Anne Archibald wrote: > > > On 23/05/07, Albert Strasheim <[EMAIL PROTECTED] > > wrote: > > >

Re: [Numpy-discussion] Question about flags of fancy indexed array

2007-05-23 Thread Travis Oliphant
Albert Strasheim wrote: > Hello all > > Consider the following example: > > In [43]: x = N.zeros((3,2)) > > In [44]: x.flags > Out[44]: > C_CONTIGUOUS : True > F_CONTIGUOUS : False > OWNDATA : True > WRITEABLE : True > ALIGNED : True > UPDATEIFCOPY : False > > In [45]: x[:,[1,0]].flags

[Numpy-discussion] Linux numpy 1.0.1 install failed - undefined symbol: pthread_join

2007-05-23 Thread Gong, Shawn (Contractor)
Hi Robert and list, My colleague said that it certainly looks like a missing thread library. It looks like the problem is that lapack_lite was compiled multi-threaded and can't find the thread library. Any solution to that? BTW, I tried 1.0.2 and got the same error. Thanks, Shawn -Original

Re: [Numpy-discussion] norm in scipy.linalg but not numpy?

2007-05-23 Thread Charles R Harris
On 5/23/07, Robert Kern <[EMAIL PROTECTED]> wrote: dmitrey wrote: > hi all, > I was very surprised that norm() is present in scipy.linalg but absent > in numpy. > Don't you think it's better to add the one to numpy? In [237]: import numpy In [238]: numpy.linalg.norm? Type: function

Re: [Numpy-discussion] norm in scipy.linalg but not numpy?

2007-05-23 Thread Robert Kern
dmitrey wrote: > Ok, then appropriate changes in > http://www.scipy.org/NumPy_for_Matlab_Users should be made Go for it. -- Robert Kern "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 a

Re: [Numpy-discussion] norm in scipy.linalg but not numpy?

2007-05-23 Thread dmitrey
Ok, then appropriate changes in http://www.scipy.org/NumPy_for_Matlab_Users should be made D. Robert Kern wrote: > dmitrey wrote: > >> hi all, >> I was very surprised that norm() is present in scipy.linalg but absent >> in numpy. >> Don't you think it's better to add the one to numpy? >>

Re: [Numpy-discussion] norm in scipy.linalg but not numpy?

2007-05-23 Thread Robert Kern
dmitrey wrote: > hi all, > I was very surprised that norm() is present in scipy.linalg but absent > in numpy. > Don't you think it's better to add the one to numpy? In [237]: import numpy In [238]: numpy.linalg.norm? Type: function Base Class: Namespace:Interactive Fil

Re: [Numpy-discussion] Question about flags of fancy indexed array

2007-05-23 Thread Timothy Hochberg
I'm not sure why the data ends up F_CONTIGUOUS, but it appears that you can get things to end up as C_CONTIGUOUS by transposing before the indexing and then transposing back. I don't think that this results in extra copies, but I'm not certain of that. a = np.arange(6).reshape(3,2) a array([[0,

Re: [Numpy-discussion] norm in scipy.linalg but not numpy?

2007-05-23 Thread Nils Wagner
dmitrey wrote: > hi all, > I was very surprised that norm() is present in scipy.linalg but absent > in numpy. > Don't you think it's better to add the one to numpy? > As for me, I use the func very intensively, and I don't want to write my > own (slow) func in Python or use > > sqrt(dot(v,v)) > o

[Numpy-discussion] norm in scipy.linalg but not numpy?

2007-05-23 Thread dmitrey
hi all, I was very surprised that norm() is present in scipy.linalg but absent in numpy. Don't you think it's better to add the one to numpy? As for me, I use the func very intensively, and I don't want to write my own (slow) func in Python or use sqrt(dot(v,v)) or scipy.linalg.norm(v) (i.e. mak

Re: [Numpy-discussion] Question about flags of fancy indexed array

2007-05-23 Thread Charles R Harris
On 5/23/07, Anne Archibald <[EMAIL PROTECTED]> wrote: On 23/05/07, Albert Strasheim <[EMAIL PROTECTED]> wrote: > If you are correct that this is in fact a fresh new array, I really > don't understand where the values of these flags. To recap: > > In [19]: x = N.zeros((3,2)) > > In [20]: x.flags

Re: [Numpy-discussion] Question about flags of fancy indexed array

2007-05-23 Thread Charles R Harris
On 5/23/07, Charles R Harris <[EMAIL PROTECTED]> wrote: On 5/23/07, Albert Strasheim <[EMAIL PROTECTED]> wrote: > > Hello all > > On Wed, 23 May 2007, Anne Archibald wrote: > > > On 23/05/07, Albert Strasheim <[EMAIL PROTECTED]> wrote: > > > > > Consider the following example: > > > > First a

Re: [Numpy-discussion] Question about flags of fancy indexed array

2007-05-23 Thread Charles R Harris
On 5/23/07, Albert Strasheim <[EMAIL PROTECTED]> wrote: Hello all On Wed, 23 May 2007, Anne Archibald wrote: > On 23/05/07, Albert Strasheim <[EMAIL PROTECTED]> wrote: > > > Consider the following example: > > First a comment: almost nobody needs to care how the data is stored > internally. Tr

Re: [Numpy-discussion] Question about flags of fancy indexed array

2007-05-23 Thread Anne Archibald
On 23/05/07, Albert Strasheim <[EMAIL PROTECTED]> wrote: > If you are correct that this is in fact a fresh new array, I really > don't understand where the values of these flags. To recap: > > In [19]: x = N.zeros((3,2)) > > In [20]: x.flags > Out[20]: > C_CONTIGUOUS : True > F_CONTIGUOUS : Fa

Re: [Numpy-discussion] Question about flags of fancy indexed array

2007-05-23 Thread Stefan van der Walt
On Wed, May 23, 2007 at 09:49:08AM -0400, Anne Archibald wrote: > On 23/05/07, Albert Strasheim <[EMAIL PROTECTED]> wrote: > > > Is it correct that the F_CONTIGUOUS flag is set in the case of the fancy > > indexed x? I'm running NumPy 1.0.3.dev3792 here. > > Numpy arrays are always stored in conti

Re: [Numpy-discussion] Question about flags of fancy indexed array

2007-05-23 Thread Albert Strasheim
Hello all On Wed, 23 May 2007, Anne Archibald wrote: > On 23/05/07, Albert Strasheim <[EMAIL PROTECTED]> wrote: > > > Consider the following example: > > First a comment: almost nobody needs to care how the data is stored > internally. Try to avoid looking at the flags unless you're > interfaci

Re: [Numpy-discussion] Question about flags of fancy indexed array

2007-05-23 Thread Anne Archibald
On 23/05/07, Albert Strasheim <[EMAIL PROTECTED]> wrote: > Consider the following example: First a comment: almost nobody needs to care how the data is stored internally. Try to avoid looking at the flags unless you're interfacing with a C library. The nice feature of numpy is that it hides all t

[Numpy-discussion] Question about flags of fancy indexed array

2007-05-23 Thread Albert Strasheim
Hello all Consider the following example: In [43]: x = N.zeros((3,2)) In [44]: x.flags Out[44]: C_CONTIGUOUS : True F_CONTIGUOUS : False OWNDATA : True WRITEABLE : True ALIGNED : True UPDATEIFCOPY : False In [45]: x[:,[1,0]].flags Out[45]: C_CONTIGUOUS : False F_CONTIGUOUS : Tru

Re: [Numpy-discussion] numpy and freeze.py

2007-05-23 Thread Hanno Klemm
Thanks for your hint! My numpy version is 1.0.2. compiled by myself a bit ago. I have however not fully understood your reply. Is the issue, that caused problems in your code in the numpy svn version resolved now? I read something in the thread about forcefully unloading certain DLLs, I am on a