Re: [Numpy-discussion] maskedarray: how to force mask to expand

2008-09-26 Thread Vincent Schut
Pierre, Thanks for your explanations. It still seems a little (too) complicated, but from a backwards-compatibility pov combined with your 'nomask is not False' implementation detail, I can understand mostly :-) I think the idea that when a.mask returns False, that actually means nomask instead

Re: [Numpy-discussion] Help speeding up element-wise operations for video processing

2008-09-26 Thread Hans Meine
Am Mittwoch, 17. September 2008 01:43:45 schrieb Brendan Simons: > On 16-Sep-08, at 4:50 AM, Stéfan van der Walt wrote: > > I may be completely off base here, but you should be able to do this > > *very* quickly using your GPU, or even just using OpenGL. Otherwise, > > coding it up in ctypes is ea

[Numpy-discussion] Cython: Passing numpy array into C via buffer?

2008-09-26 Thread Richard Shaw
Hello, Forgive me if this is a stupid question, I've been looking around all the Cython documentation and I can't find out if this is possible. What I would like to do is generally is wrap a C function that takes a double array, and be able to pass in a numpy array, I was wondering if it's pos

Re: [Numpy-discussion] Cython: Passing numpy array into C via buffer?

2008-09-26 Thread Dag Sverre Seljebotn
Richard Shaw wrote: > Hello, > > Forgive me if this is a stupid question, I've been looking around all > the Cython documentation and I can't find out if this is possible. > > What I would like to do is generally is wrap a C function that takes a > double array, and be able to pass in a numpy a

Re: [Numpy-discussion] Cython: Passing numpy array into C via buffer?

2008-09-26 Thread Dag Sverre Seljebotn
Richard Shaw wrote: > Hello, > > Forgive me if this is a stupid question, I've been looking around all > the Cython documentation and I can't find out if this is possible. > > What I would like to do is generally is wrap a C function that takes a > double array, and be able to pass in a numpy a

Re: [Numpy-discussion] Cython: Passing numpy array into C via buffer?

2008-09-26 Thread Richard Shaw
Dag Sverre Seljebotn wrote: > I'm sorry, my previous answer was a really, really bad one. Here's a > better one: > > data = numarr.data > > :-) With the addition of the _t on float64 this should just work. That sounds great. I thought there must be something like that, it's glad to see that C

Re: [Numpy-discussion] Proper NaN handling in max and co: a redux

2008-09-26 Thread Charles R Harris
On Thu, Sep 25, 2008 at 10:56 PM, David Cournapeau < [EMAIL PROTECTED]> wrote: > Charles R Harris wrote: > > > > I'm also wondering about the sign ufunc. It should probably return nan > > for nans, but -1,0,1 are the current values. We also need to decide > > which end of the sorted values the nan

[Numpy-discussion] vectorize in new.instancemethod and *args

2008-09-26 Thread joep
I have a question about the use of vectorize in new.instancemethod: Using vectorize with *args requires adjustment to the number of arguments, nin = nargs. This works when it is used with a function. However, I don't manage to set nin when using vectorize with a method created with new.instancemet

Re: [Numpy-discussion] maskedarray: how to force mask to expand

2008-09-26 Thread Pierre GM
Vincent, > I think the > idea that when a.mask returns False, that actually means nomask instead > of the False I'm used to, is what caused a major part of my confusion. Indeed. > It might actually be nice to give you some context of why I asked this: > during my (satellite image) processing, I

Re: [Numpy-discussion] Proper NaN handling in max and co: a redux

2008-09-26 Thread Pierre GM
On Friday 26 September 2008 08:29:02 Charles R Harris wrote: > It shouldn't be any more difficult to do either based on a keyword. > Argsorts shouldn't be a problem either. I'm thinking that the most flexible > way to handle the sorts is to make a preliminary pass through the data and > collect all

Re: [Numpy-discussion] Proper NaN handling in max and co: a redux

2008-09-26 Thread Anne Archibald
2008/9/26 David Cournapeau <[EMAIL PROTECTED]>: > Charles R Harris wrote: >> >> I'm also wondering about the sign ufunc. It should probably return nan >> for nans, but -1,0,1 are the current values. We also need to decide >> which end of the sorted values the nans should go to. I'm a bit >> partial

Re: [Numpy-discussion] vectorize in new.instancemethod and *args

2008-09-26 Thread joep
On Sep 26, 11:35 am, joep <[EMAIL PROTECTED]> wrote: > I have a question about the use of vectorize in new.instancemethod: > > # case D: class with vectorize with nin adjustment -> broken > # nin is not correctly used by vectorize > > class D(object): >     def __init__(self): >         # define

Re: [Numpy-discussion] Proper NaN handling in max and co: a redux

2008-09-26 Thread David Cournapeau
Anne Archibald wrote: > > I would think sign should return NaN (does it not now?) unless its > return type is integer, in which case I can't see a better answer than > raising an exception (we certainly don't want it silently swallowing > NaNs). > signbit (the C99 macro) returns an integer. So

Re: [Numpy-discussion] ANN: NumPy 1.2.0

2008-09-26 Thread Thomas Heller
Jarrod Millman schrieb: > I'm pleased to announce the release of NumPy 1.2.0. > I see that the windows installer is now a superkac installer, which AFAIU selects the 'right' components for the target computer at install time. If I now build applications using numpy with py2exe for distribution,

Re: [Numpy-discussion] ANN: NumPy 1.2.0

2008-09-26 Thread David Cournapeau
Thomas Heller wrote: > > I see that the windows installer is now a superkac installer, > which AFAIU selects the 'right' components for the target computer > at install time. Yes, it is the case since 1.1.0. It is not ideal, but it effectively solved a common problem of people not having the right

Re: [Numpy-discussion] ANN: NumPy 1.2.0

2008-09-26 Thread Thomas Heller
[Thomas] >> If I now build applications using numpy with py2exe for distribution, >> what will happen on the target computers if the components are not 'right' >> for the actual machine type? [David] > Note that the superpack is actually quite primitive: it is a nsis > installer which encompasses

Re: [Numpy-discussion] ANN: NumPy 1.2.0

2008-09-26 Thread Charles R Harris
On Fri, Sep 26, 2008 at 12:24 PM, Thomas Heller <[EMAIL PROTECTED]> wrote: > [Thomas] > >> If I now build applications using numpy with py2exe for distribution, > >> what will happen on the target computers if the components are not > 'right' > >> for the actual machine type? > > [David] > > Note

[Numpy-discussion] numpy installation as non root using site.cfg

2008-09-26 Thread Poul Georg Moses
Dear mailing list I am trying to install numpy-1.1.1 on a cluster where I do not have root permission. I have succesfully installed \ python2.5.2. I am using the cite.cfg file to include the blas and atlas libraries. I have done that by setting the\ defaults to: library_dirs = /usr/lib include_d

Re: [Numpy-discussion] numpy installation as non root using site.cfg

2008-09-26 Thread Robert Kern
On Fri, Sep 26, 2008 at 18:07, Poul Georg Moses <[EMAIL PROTECTED]> wrote: > > Dear mailing list > > I am trying to install numpy-1.1.1 on a cluster where I do not have root > permission. I have succesfully installed \ > python2.5.2. I am using the cite.cfg file to include the blas and atlas > libr

Re: [Numpy-discussion] profiling line by line

2008-09-26 Thread Robert Kern
On Wed, Sep 17, 2008 at 07:12, Arnar Flatberg <[EMAIL PROTECTED]> wrote: > > On Wed, Sep 17, 2008 at 3:56 AM, Robert Kern <[EMAIL PROTECTED]> wrote: >> >> So, I could use some comments on the workflow. Does this look sensible >> to everyone? How else would you like to use it? > > Works for me. I wo

[Numpy-discussion] bug in fromiter - with patch

2008-09-26 Thread Russel Howe
As of SVN from this morning, fromiter cannot create an array whose dtype is a byte type In [1]: np.fromiter(range(10), dtype='b') --- MemoryError Traceback (most recent call last) /Users/baxter

Re: [Numpy-discussion] bug in fromiter - with patch

2008-09-26 Thread Russel Howe
Oops. I made a last minute change without re-running the tests. The tests refer to np.range, that should just be range. Corrected test attached. Russel Howe wrote: As of SVN from this morning, fromiter cannot create an array whose dtype is a byte type In [1]: np.fromiter(range(10), dtype=

Re: [Numpy-discussion] profiling line by line

2008-09-26 Thread Fernando Perez
Hey, On Fri, Sep 26, 2008 at 5:36 PM, Robert Kern <[EMAIL PROTECTED]> wrote: > There is now! Add > >import line_profiler >ip.expose_magic('lprun', line_profiler.magic_lprun) > > to your ipy_user_conf.py . Mmh, should we ship this out of the box in ipython? The C dependency is the only

[Numpy-discussion] ANNOUNCE: EPD (Enthought Python Distribution) 4.0.300 Beta 3 available

2008-09-26 Thread Dave Peterson
Hello, We've recently posted the third beta release of EPD (the Enthought Python Distribution) with Python 2.5 version 4.0.300. You may download the beta from here: http://www.enthought.com/products/epdbeta.php Please help us test it out and provide feedback on the EPD Trac instance: ht

Re: [Numpy-discussion] Bug fix or behavior change?

2008-09-26 Thread Travis E. Oliphant
Charles R Harris wrote: > Hi All, > > Currently subtract for boolean arrays is defined in > > /**begin repeat > * Arithmetic operators > * > * # OP = ||, ^, &&# > * #kind = add, subtract, multiply# > */ > static void > [EMAIL PROTECTED]@(char **args, intp *dimensions, intp *steps, void *func)