Re: [Numpy-discussion] 1.5 release schedule proposal

2010-07-27 Thread Pauli Virtanen
Mon, 26 Jul 2010 23:58:11 +0800, Ralf Gommers wrote: For numpy 1.5.0 no one has yet said they have urgent changes that need to go in. If you do, please reply with the what and why. If nothing big has to go in, I propose the following release schedule: Aug 1 : beta 1 Aug 15: rc 1 Aug 22: rc

Re: [Numpy-discussion] Numpy 1.4.1 fails to build on (Debian) alpha and powepc

2010-07-27 Thread David Cournapeau
On Tue, Jul 20, 2010 at 3:44 AM, Sandro Tosi mo...@debian.org wrote: ah if you say so, I trust you :) Could you try the last version of the trunk, I added the missing macros for alpha ? cheers, David ___ NumPy-Discussion mailing list

Re: [Numpy-discussion] determinant of a scalar not handled

2010-07-27 Thread Skipper Seabold
On Mon, Jul 26, 2010 at 10:05 PM, Alan G Isaac ais...@american.edu wrote: But I am still confused about the use case. What is the scalar- (or 1d-array-) returning procedure invokedbefore taking the determinant? Recently I ran into this trying to make the log-likelihood of a multivariate and

Re: [Numpy-discussion] Numpy 1.4.1 fails to build on (Debian) alpha and powepc

2010-07-27 Thread Sandro Tosi
Hi, On Tue, Jul 27, 2010 at 12:28, David Cournapeau courn...@gmail.com wrote: On Tue, Jul 20, 2010 at 3:44 AM, Sandro Tosi mo...@debian.org wrote: ah if you say so, I trust you :) Could you try the last version of the trunk, I added the missing macros for alpha ? I just built trunk (both

[Numpy-discussion] size_t or npy_intp?

2010-07-27 Thread Francesc Alted
Hi, I'm a bit confused on which datatype should I use when referring to NumPy ndarray lengths. In one hand I'd use `size_t` that is the canonical way to refer to lengths of memory blocks. In the other hand, `npy_intp` seems the standard data type used in NumPy for this. Which one would you

Re: [Numpy-discussion] size_t or npy_intp?

2010-07-27 Thread Charles R Harris
On Tue, Jul 27, 2010 at 7:08 AM, Francesc Alted fal...@pytables.org wrote: Hi, I'm a bit confused on which datatype should I use when referring to NumPy ndarray lengths. In one hand I'd use `size_t` that is the canonical way to refer to lengths of memory blocks. In the other hand,

Re: [Numpy-discussion] 1.5 release schedule proposal

2010-07-27 Thread Bruce Southey
On Tue, Jul 27, 2010 at 3:38 AM, Pauli Virtanen p...@iki.fi wrote: Mon, 26 Jul 2010 23:58:11 +0800, Ralf Gommers wrote: For numpy 1.5.0 no one has yet said they have urgent changes that need to go in. If you do, please reply with the what and why. If nothing big has to go in, I propose the

[Numpy-discussion] Problem with importing numpy in Ubuntu

2010-07-27 Thread Robert Faryabi
I am new to numpy. Hopefully this is a correct forum to post my question. I have Ubuntu Luci system. I installed Python 2.6.5 and Python 3.0 as well as python-numpy using Ubuntu repository. When I import the numpy into python, I get the following error. import numpy Traceback (most recent call

Re: [Numpy-discussion] Problem with importing numpy in Ubuntu

2010-07-27 Thread Matthieu Brucher
Which version of Python are you actually using in this example? Matthieu 2010/7/27 Robert Faryabi robert.fary...@gmail.com: I am new to numpy. Hopefully this is a correct forum to post my question. I have Ubuntu Luci system. I installed Python 2.6.5 and Python 3.0 as well as python-numpy

Re: [Numpy-discussion] Problem with importing numpy in Ubuntu

2010-07-27 Thread Robert Faryabi
I am using 2.5.6 Python 2.6.5 (r265:79063, Jun 28 2010, 20:31:28) [GCC 4.4.3] on linux2 On Tue, Jul 27, 2010 at 9:51 AM, Matthieu Brucher matthieu.bruc...@gmail.com wrote: Which version of Python are you actually using in this example? Matthieu 2010/7/27 Robert Faryabi

Re: [Numpy-discussion] determinant of a scalar not handled

2010-07-27 Thread Alan G Isaac
On Mon, Jul 26, 2010 at 10:05 PM, Alan G Isaacais...@american.edu wrote: But I am still confused about the use case. What is the scalar- (or 1d-array-) returning procedure invoked before taking the determinant? On 7/27/2010 8:51 AM, Skipper Seabold wrote: Recently I ran into this trying to

Re: [Numpy-discussion] Problem with importing numpy in Ubuntu

2010-07-27 Thread Matthieu Brucher
Python 2.6.5 from Ubuntu? I tried the same yesterday evening, and it worked like a charm. Matthieu 2010/7/27 Robert Faryabi robert.fary...@gmail.com: I am using 2.5.6 Python 2.6.5 (r265:79063, Jun 28 2010, 20:31:28) [GCC 4.4.3] on linux2 On Tue, Jul 27, 2010 at 9:51 AM, Matthieu Brucher

Re: [Numpy-discussion] Problem with importing numpy in Ubuntu

2010-07-27 Thread Charles R Harris
On Tue, Jul 27, 2010 at 7:46 AM, Robert Faryabi robert.fary...@gmail.comwrote: I am new to numpy. Hopefully this is a correct forum to post my question. I have Ubuntu Luci system. I installed Python 2.6.5 and Python 3.0 as well as python-numpy using Ubuntu repository. When I import the numpy

Re: [Numpy-discussion] dtype.type for structured arrays

2010-07-27 Thread Thomas Robitaille
Thomas Robitaille wrote: I seem to remember that this used not to be the case, and that even for vector columns, one could access array.dtype[0].type to get the numerical type. Is this a bug, or deliberate? I submitted a bug report: http://projects.scipy.org/numpy/ticket/1557 Cheers,

Re: [Numpy-discussion] 1.5 release schedule proposal

2010-07-27 Thread Benjamin Root
On Tue, Jul 27, 2010 at 3:38 AM, Pauli Virtanen p...@iki.fi wrote: Mon, 26 Jul 2010 23:58:11 +0800, Ralf Gommers wrote: For numpy 1.5.0 no one has yet said they have urgent changes that need to go in. If you do, please reply with the what and why. If nothing big has to go in, I propose the

Re: [Numpy-discussion] Problem with importing numpy in Ubuntu

2010-07-27 Thread Robert Faryabi
Yes, It seems there is a problem with some sort of header. I have no Idea. Look at this http://article.gmane.org/gmane.comp.python.numeric.general/3508/match=numpy+core+multiarray+so+_pyunicodeucs4_iswhitespace On Tue, Jul 27, 2010 at 10:03 AM, Matthieu Brucher matthieu.bruc...@gmail.com

Re: [Numpy-discussion] Problem with importing numpy in Ubuntu

2010-07-27 Thread Robert Faryabi
I can see the numpy now, but I have the problem with a shared library. Here is the error import numpy Traceback (most recent call last): File stdin, line 1, in module File /usr/lib/python2.6/dist-packages/numpy/__init__.py, line 130, in module import add_newdocs File

Re: [Numpy-discussion] 1.5 release schedule proposal

2010-07-27 Thread Ralf Gommers
On Tue, Jul 27, 2010 at 9:40 PM, Bruce Southey bsout...@gmail.com wrote: On Tue, Jul 27, 2010 at 3:38 AM, Pauli Virtanen p...@iki.fi wrote: Mon, 26 Jul 2010 23:58:11 +0800, Ralf Gommers wrote: For numpy 1.5.0 no one has yet said they have urgent changes that need to go in. If you do,

Re: [Numpy-discussion] Problem with importing numpy in Ubuntu

2010-07-27 Thread Matthieu Brucher
It's a problem of compilation of Python and numpy with different parameters. But I've tried the same yesterday, and the Ubuntu repository are OK in that respect, so there is something not quite right with your configuration. Matthieu 2010/7/27 Robert Faryabi robert.fary...@gmail.com: I can see

Re: [Numpy-discussion] 1.5 release schedule proposal

2010-07-27 Thread Ralf Gommers
On Tue, Jul 27, 2010 at 10:17 PM, Benjamin Root ben.r...@ou.edu wrote: On Tue, Jul 27, 2010 at 3:38 AM, Pauli Virtanen p...@iki.fi wrote: Mon, 26 Jul 2010 23:58:11 +0800, Ralf Gommers wrote: For numpy 1.5.0 no one has yet said they have urgent changes that need to go in. If you do, please

Re: [Numpy-discussion] 1.5 release schedule proposal

2010-07-27 Thread Jed Ludlow
On Tue, Jul 27, 2010 at 2:38 AM, Pauli Virtanen p...@iki.fi wrote: One low-hanging fruit to fix could be np.fromfile raising MemoryError when it encounters EOF, and other bugs in that part of the code. The EOF bug in np.fromfile may already be fixed:

Re: [Numpy-discussion] Problem with importing numpy in Ubuntu

2010-07-27 Thread Sebastian Haase
The origin of this problem is the fact that Python supports (at least) 2 types of Unicode: 2 bytes and/or 4 bytes per character. Additionally, for some incomprehensible reason the Python source code (as downloaded from python.org) defaults to 2ByteUnicode whereas all (major) Linux distributions

Re: [Numpy-discussion] size_t or npy_intp?

2010-07-27 Thread Francesc Alted
A Tuesday 27 July 2010 15:20:47 Charles R Harris escrigué: On Tue, Jul 27, 2010 at 7:08 AM, Francesc Alted fal...@pytables.org wrote: Hi, I'm a bit confused on which datatype should I use when referring to NumPy ndarray lengths. In one hand I'd use `size_t` that is the canonical way to

Re: [Numpy-discussion] size_t or npy_intp?

2010-07-27 Thread Dag Sverre Seljebotn
Francesc Alted wrote: A Tuesday 27 July 2010 15:20:47 Charles R Harris escrigué: On Tue, Jul 27, 2010 at 7:08 AM, Francesc Alted fal...@pytables.org wrote: Hi, I'm a bit confused on which datatype should I use when referring to NumPy ndarray lengths. In one hand I'd use `size_t`

Re: [Numpy-discussion] size_t or npy_intp?

2010-07-27 Thread Kurt Smith
On Tue, Jul 27, 2010 at 9:45 AM, Francesc Alted fal...@pytables.org wrote: A Tuesday 27 July 2010 15:20:47 Charles R Harris escrigué: On Tue, Jul 27, 2010 at 7:08 AM, Francesc Alted fal...@pytables.org wrote: Hi, I'm a bit confused on which datatype should I use when referring to NumPy

Re: [Numpy-discussion] size_t or npy_intp?

2010-07-27 Thread Francesc Alted
A Tuesday 27 July 2010 17:17:55 Dag Sverre Seljebotn escrigué: Kurt Smith wrote: Looking at the bufferinfo struct for the buffer protocol, it uses `Py_ssize_t`: struct bufferinfo { void *buf; Py_ssize_t len; int readonly; const char *format; int ndim;

Re: [Numpy-discussion] size_t or npy_intp?

2010-07-27 Thread Kurt Smith
On Tue, Jul 27, 2010 at 10:17 AM, Dag Sverre Seljebotn da...@student.matnat.uio.no wrote:  From PEP 353:    Why not size_t56 http://www.python.org/dev/peps/pep-0353/#id9 An initial attempt to implement this feature tried to use size_t. It quickly turned out that this cannot work: Python

Re: [Numpy-discussion] size_t or npy_intp?

2010-07-27 Thread David Cournapeau
On Tue, Jul 27, 2010 at 10:08 PM, Francesc Alted fal...@pytables.org wrote: Hi, I'm a bit confused on which datatype should I use when referring to NumPy ndarray lengths.  In one hand I'd use `size_t` that is the canonical way to refer to lengths of memory blocks.  In the other hand,

Re: [Numpy-discussion] Numpy 1.4.1 fails to build on (Debian) alpha and powepc

2010-07-27 Thread Sandro Tosi
On Tue, Jul 27, 2010 at 14:52, Sandro Tosi mo...@debian.org wrote: Hi, On Tue, Jul 27, 2010 at 12:28, David Cournapeau courn...@gmail.com wrote: On Tue, Jul 20, 2010 at 3:44 AM, Sandro Tosi mo...@debian.org wrote: ah if you say so, I trust you :) Could you try the last version of the

Re: [Numpy-discussion] Numpy 1.4.1 fails to build on (Debian) alpha and powepc

2010-07-27 Thread David Cournapeau
On Tue, Jul 27, 2010 at 9:52 PM, Sandro Tosi mo...@debian.org wrote: I just built trunk (both for 2.5 and 2.6) on alpha, successfully :) Now I'll extract only the needed patch (I think it's enough to apply r8526, right?) and try to build the package using 1.4.1+patch, if it builds

Re: [Numpy-discussion] numpydoc broken with sphinx 1.0

2010-07-27 Thread Matthew Brett
On Mon, Jul 26, 2010 at 1:56 PM, Gael Varoquaux gael.varoqu...@normalesup.org wrote: On Mon, Jul 26, 2010 at 01:52:06PM -0700, Matthew Brett wrote: http://old.nabble.com/numpydoc-broken-by-latest-sphinx-td28896476.html http://projects.scipy.org/numpy/ticket/1489 Darn, I should have googled :(

Re: [Numpy-discussion] determinant of a scalar not handled

2010-07-27 Thread Robert Kern
On Tue, Jul 27, 2010 at 07:51, Skipper Seabold jsseab...@gmail.com wrote: On Mon, Jul 26, 2010 at 10:05 PM, Alan G Isaac ais...@american.edu wrote: But I am still confused about the use case. What is the scalar- (or 1d-array-) returning procedure invokedbefore taking the determinant?

Re: [Numpy-discussion] Problem with importing numpy in Ubuntu

2010-07-27 Thread Robert Faryabi
I'm getting the same sys.maxunicode 65535 I might have some hand complied python. Once I compiled Biopython long ago. The problem is I do not know how to clean up all the python version that I have. I tried the reinstall option. It does not work. I cannot remove the python. It will wipe out my

Re: [Numpy-discussion] Problem with importing numpy in Ubuntu

2010-07-27 Thread Matthieu Brucher
What does which python return? 2010/7/27 Robert Faryabi robert.fary...@gmail.com: I'm getting the same sys.maxunicode 65535 I might have some hand complied python. Once I compiled Biopython long ago. The problem is I do not know how to clean up all the python version that I have. I

Re: [Numpy-discussion] Problem with importing numpy in Ubuntu

2010-07-27 Thread Robert Faryabi
As Sebastian suggested, I might have some hand compiled python. Anyone could tell me how can I get rid of all my python and reinstall a fresh one? On Tue, Jul 27, 2010 at 10:33 AM, Matthieu Brucher matthieu.bruc...@gmail.com wrote: It's a problem of compilation of Python and numpy with

Re: [Numpy-discussion] Problem with importing numpy in Ubuntu

2010-07-27 Thread Robert Faryabi
it returns /usr/local/bin/python On Tue, Jul 27, 2010 at 12:07 PM, Matthieu Brucher matthieu.bruc...@gmail.com wrote: What does which python return? 2010/7/27 Robert Faryabi robert.fary...@gmail.com: I'm getting the same sys.maxunicode 65535 I might have some hand complied

[Numpy-discussion] Help w/ indexing, please

2010-07-27 Thread David Goldsmith
Hi! I have a large M x K, M, K ~ 1e3 array L of indices - non-negative integers in the range 0 to N-1 - and an N x 3 array C (a matplotlib colormap). I need to create an M x K x 3 array R such that R[m,k,j] = C[L[m,k], j], j = 0,1,2. I want to do so w/out having to loop through all the (m,k)

Re: [Numpy-discussion] determinant of a scalar not handled

2010-07-27 Thread Skipper Seabold
On Tue, Jul 27, 2010 at 10:01 AM, Alan G Isaac ais...@american.edu wrote: On Mon, Jul 26, 2010 at 10:05 PM, Alan G Isaacais...@american.edu  wrote: But I am still confused about the use case. What is the scalar- (or 1d-array-) returning procedure invoked before taking the determinant? On

Re: [Numpy-discussion] Problem with importing numpy in Ubuntu

2010-07-27 Thread Robert Faryabi
I just looked at my system more carefully. There are two executable files /usr/local/bin/python and /usr/bin/python this is a link to python2.6 I believe that the first one is source compiled version. So, how can I get rid of it? On Tue, Jul 27, 2010 at 12:09 PM, Robert Faryabi

Re: [Numpy-discussion] Help w/ indexing, please

2010-07-27 Thread John Salvatier
I am pretty sure you should be able to do R = C[L, :] and get the array you want. Try it with a small matrix where you know the result you want. You may need to transpose some axes afterwards, but I don't think you should. On Tue, Jul 27, 2010 at 9:10 AM, David Goldsmith

Re: [Numpy-discussion] Problem with importing numpy in Ubuntu

2010-07-27 Thread Keith Goodman
On Tue, Jul 27, 2010 at 9:29 AM, Robert Faryabi robert.fary...@gmail.com wrote: I just looked at my system more carefully. There are two executable files /usr/local/bin/python and /usr/bin/python this is a link to python2.6 I believe that the first one is source compiled version. So,

Re: [Numpy-discussion] determinant of a scalar not handled

2010-07-27 Thread Skipper Seabold
On Tue, Jul 27, 2010 at 12:00 PM, Robert Kern robert.k...@gmail.com wrote: On Tue, Jul 27, 2010 at 07:51, Skipper Seabold jsseab...@gmail.com wrote: On Mon, Jul 26, 2010 at 10:05 PM, Alan G Isaac ais...@american.edu wrote: But I am still confused about the use case. What is the scalar- (or

Re: [Numpy-discussion] determinant of a scalar not handled

2010-07-27 Thread Robert Kern
On Tue, Jul 27, 2010 at 11:36, Skipper Seabold jsseab...@gmail.com wrote: On Tue, Jul 27, 2010 at 12:00 PM, Robert Kern robert.k...@gmail.com wrote: On Tue, Jul 27, 2010 at 07:51, Skipper Seabold jsseab...@gmail.com wrote: On Mon, Jul 26, 2010 at 10:05 PM, Alan G Isaac ais...@american.edu

[Numpy-discussion] ANN: SciPy 0.8.0

2010-07-27 Thread Ralf Gommers
I'm pleased to announce the release of SciPy 0.8.0. SciPy is a package of tools for science and engineering for Python. It includes modules for statistics, optimization, integration, linear algebra, Fourier transforms, signal and image processing, ODE solvers, and more. This release comes one and

Re: [Numpy-discussion] loadtxt() behavior on single-line files

2010-07-27 Thread Benjamin Root
On Thu, Jun 24, 2010 at 1:53 PM, Benjamin Root ben.r...@ou.edu wrote: On Thu, Jun 24, 2010 at 1:00 PM, Warren Weckesser warren.weckes...@enthought.com wrote: Benjamin Root wrote: Hi, I was having the hardest time trying to figure out an intermittent bug in one of my programs.

[Numpy-discussion] atleast_1d and atleast2d breaks masked arrays

2010-07-27 Thread Benjamin Root
I have filed ticket #1559: http://projects.scipy.org/numpy/ticket/1559 Calling a function like .atleast_2d() to change the number of dimensions an array has can break the original masked array object. See the following example using a 1d masked array: import numpy a =

[Numpy-discussion] atleast_3d() strips subclass info

2010-07-27 Thread Benjamin Root
I have filed ticket #1560: http://projects.scipy.org/numpy/ticket/1560 The .atleast_3d() function can not be used with arrays that are subclassed from ndarray(). Because the function uses .asarray() instead of .asanyarray(), subclass info such as masks for masked arrays are stripped from the

Re: [Numpy-discussion] 1.5 release schedule proposal

2010-07-27 Thread Christopher Barker
Pauli Virtanen wrote: Tue, 27 Jul 2010 08:37:56 -0600, Jed Ludlow wrote: On Tue, Jul 27, 2010 at 2:38 AM, Pauli Virtanen p...@iki.fi wrote: One low-hanging fruit to fix could be np.fromfile raising MemoryError when it encounters EOF, and other bugs in that part of the code. The EOF bug in

[Numpy-discussion] Datarray sprint July 28, 2010

2010-07-27 Thread Keith Goodman
Join us for a datarray sprint on July 28. Several of us will meet at UC Berkeley from 2pm (Pacific Time) until our fingers bleed from typing or until 6 or 7pm, whichever comes first. If you can't be there in person, grab an item from the issue tracker or create your own. I'm told some of us will

Re: [Numpy-discussion] Help w/ indexing, please

2010-07-27 Thread David Goldsmith
On Tue, Jul 27, 2010 at 9:32 AM, John Salvatier jsalv...@u.washington.eduwrote: I am pretty sure you should be able to do R = C[L, :] and get the array you want. Try it with a small matrix where you know the result you want. You may need to transpose some axes afterwards, but I don't

Re: [Numpy-discussion] 1.5 release schedule proposal

2010-07-27 Thread Pauli Virtanen
Tue, 27 Jul 2010 10:50:51 -0700, Christopher Barker wrote: Pauli Virtanen wrote: Tue, 27 Jul 2010 08:37:56 -0600, Jed Ludlow wrote: On Tue, Jul 27, 2010 at 2:38 AM, Pauli Virtanen p...@iki.fi wrote: One low-hanging fruit to fix could be np.fromfile raising MemoryError when it encounters EOF,

Re: [Numpy-discussion] 1.5 release schedule proposal

2010-07-27 Thread Christopher Barker
Pauli Virtanen wrote: These are a couple relevant tickets; http://projects.scipy.org/numpy/ticket/909 http://projects.scipy.org/numpy/ticket/883 The relevant thing for 1.5.x would probably be to check that fromfile/ fromstring handle malformed data in a well-specified way, and being

Re: [Numpy-discussion] subtract.reduce behavior

2010-07-27 Thread Alan G Isaac
On 7/26/2010 9:41 AM, Johann Hibschman wrote: if reduce were defined as a *right* fold, then it would make sense for subtract (and divide) to use the right identity Instead of deviating from the Python definition of reduce, it would imo make more sense to introduce new functions, sayfoldl and

[Numpy-discussion] Don't understand this error

2010-07-27 Thread David Goldsmith
res = np.fromfunction(make_res, (nx, ny)) File C:\Python26\lib\site-packages\numpy\core\numeric.py, line 1538, in fromfunction args = indices(shape, dtype=dtype) File C:\Python26\lib\site-packages\numpy\core\numeric.py, line 1480, in indices tmp.shape = (1,)*i + (dim,)+(1,)*(N-i-1)

Re: [Numpy-discussion] First shot at svn-git conversion

2010-07-27 Thread David Cournapeau
On Mon, Jul 26, 2010 at 6:16 PM, David da...@silveregg.co.jp wrote: On 07/26/2010 05:44 PM, Pauli Virtanen wrote: Mon, 26 Jul 2010 13:57:36 +0900, David Cournapeau wrote: I have finally prepared and uploaded a test repository containing numpy code: http://github.com/numpy/numpy_svn I put a

Re: [Numpy-discussion] Don't understand this error

2010-07-27 Thread David Goldsmith
Thanks, that was it. DG On Tue, Jul 27, 2010 at 3:02 PM, Robert Kern robert.k...@gmail.com wrote: On Tue, Jul 27, 2010 at 16:59, David Goldsmith d.l.goldsm...@gmail.com wrote: res = np.fromfunction(make_res, (nx, ny)) File C:\Python26\lib\site-packages\numpy\core\numeric.py, line 1538,