Re: [Numpy-discussion] Bitwise operations and unsigned types

2012-04-10 Thread Ralf Gommers
On Sat, Apr 7, 2012 at 8:07 PM, Travis Oliphant wrote: > If we just announce that there has been some code changes that alter > corner-case casting rules, I think we can move forward. > Sounds good to me. > We could use a script to document the changes and create a test case which > would help

Re: [Numpy-discussion] NpyAccessLib method documentation?

2012-04-10 Thread Dag Sverre Seljebotn
On 04/10/2012 10:13 PM, William Johnston wrote: > Hello, > Anyone there? > williamj > The likely reason nobody answers your question is that this is the list for NumPy for CPython, and the .NET port of NumPy is something 99.9% of the readers know nothing about. I'm not sure if there's even a li

Re: [Numpy-discussion] NpyAccessLib method documentation?

2012-04-10 Thread William Johnston
Hello, Anyone there? williamj ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] YouTrack testbed

2012-04-10 Thread David Cournapeau
On Tue, Apr 10, 2012 at 8:40 PM, Ralf Gommers wrote: > > > On Mon, Apr 9, 2012 at 10:32 PM, Bryan Van de Ven wrote: > >> On 4/3/12 4:18 PM, Ralf Gommers wrote: >> > Here some first impressions. >> > >> > The good: >> > - It's responsive! >> > - It remembers my preferences (view type, # of issues p

Re: [Numpy-discussion] YouTrack testbed

2012-04-10 Thread Ralf Gommers
On Mon, Apr 9, 2012 at 10:32 PM, Bryan Van de Ven wrote: > On 4/3/12 4:18 PM, Ralf Gommers wrote: > > Here some first impressions. > > > > The good: > > - It's responsive! > > - It remembers my preferences (view type, # of issues per page, etc.) > > - Editing multiple issues with the command windo

Re: [Numpy-discussion] Getting C-function pointers from Python to C

2012-04-10 Thread Travis Oliphant
On Apr 10, 2012, at 10:25 AM, Nadav Horesh wrote: > Sorry for being slow. > There is (I think) a related question I raised on the skimage list: > I have a cython function that calls a C callback function in a loop (one call > for each pixel in an image). The C function in compiled in a different

Re: [Numpy-discussion] Masked Arrays in NumPy 1.x

2012-04-10 Thread Pauli Virtanen
10.04.2012 06:52, Travis Oliphant kirjoitti: [clip] > 4) I'm still not sure about whether the IGNORED > concept is necessary or not. I really like the separation > that was emphasized between implementation (masks versus > bit-patterns) and operations (propagating versus non-propagating). > P

Re: [Numpy-discussion] Why is numpy.abs so much slower on complex64 than complex128 under windows 32-bit?

2012-04-10 Thread Francesc Alted
On 4/10/12 11:43 AM, Henry Gomersall wrote: > On 10/04/2012 17:57, Francesc Alted wrote: >>> I'm using numexpr in the end, but this is slower than numpy.abs under linux. >> Oh, you mean the windows version of abs(complex64) in numexpr is slower >> than a pure numpy.abs(complex64) under linux? That

Re: [Numpy-discussion] Why is numpy.abs so much slower on complex64 than complex128 under windows 32-bit?

2012-04-10 Thread Henry Gomersall
On 10/04/2012 17:57, Francesc Alted wrote: >> I'm using numexpr in the end, but this is slower than numpy.abs under linux. > Oh, you mean the windows version of abs(complex64) in numexpr is slower > than a pure numpy.abs(complex64) under linux? That's weird, because > numexpr has an independent im

Re: [Numpy-discussion] Slice specified axis

2012-04-10 Thread Benjamin Root
On Tue, Apr 10, 2012 at 12:52 PM, Jonathan T. Niehof wrote: > On 04/09/2012 09:11 PM, Tony Yu wrote: > > > I guess I wasn't reading very carefully and assumed that you meant a > > list of `slice(None)` instead of a list of `None`. > > My apologies to Ben...I wasn't being pedantic to be a jerk, I w

Re: [Numpy-discussion] Why is numpy.abs so much slower on complex64 than complex128 under windows 32-bit?

2012-04-10 Thread Benjamin Root
On Tue, Apr 10, 2012 at 12:57 PM, Francesc Alted wrote: > On 4/10/12 9:55 AM, Henry Gomersall wrote: > > On 10/04/2012 16:36, Francesc Alted wrote: > >> In [10]: timeit c = numpy.complex64(numpy.abs(numpy.complex128(b))) > >> 100 loops, best of 3: 12.3 ms per loop > >> > >> In [11]: timeit c = num

Re: [Numpy-discussion] Why is numpy.abs so much slower on complex64 than complex128 under windows 32-bit?

2012-04-10 Thread Francesc Alted
On 4/10/12 9:55 AM, Henry Gomersall wrote: > On 10/04/2012 16:36, Francesc Alted wrote: >> In [10]: timeit c = numpy.complex64(numpy.abs(numpy.complex128(b))) >> 100 loops, best of 3: 12.3 ms per loop >> >> In [11]: timeit c = numpy.abs(b) >> 100 loops, best of 3: 8.45 ms per loop >> >> in your win

Re: [Numpy-discussion] Slice specified axis

2012-04-10 Thread Jonathan T. Niehof
On 04/09/2012 09:11 PM, Tony Yu wrote: > I guess I wasn't reading very carefully and assumed that you meant a > list of `slice(None)` instead of a list of `None`. My apologies to Ben...I wasn't being pedantic to be a jerk, I was being pedantic because I read Ben's message and thought "oooh, that

Re: [Numpy-discussion] Why is numpy.abs so much slower on complex64 than complex128 under windows 32-bit?

2012-04-10 Thread Henry Gomersall
On 10/04/2012 16:36, Francesc Alted wrote: > In [10]: timeit c = numpy.complex64(numpy.abs(numpy.complex128(b))) > 100 loops, best of 3: 12.3 ms per loop > > In [11]: timeit c = numpy.abs(b) > 100 loops, best of 3: 8.45 ms per loop > > in your windows box and see if they raise similar results? > No

Re: [Numpy-discussion] Getting C-function pointers from Python to C

2012-04-10 Thread Dag Sverre Seljebotn
That is rather unrelated, you better ask this again on the cython-users list (be warned that top-posting is strongly discouraged in that place). Dag -- Sent from my Android phone with K-9 Mail. Please excuse my brevity. Nadav Horesh wrote: Sorry for being slow. There is (I think) a related qu

Re: [Numpy-discussion] Why is numpy.abs so much slower on complex64 than complex128 under windows 32-bit?

2012-04-10 Thread Francesc Alted
On 4/10/12 6:44 AM, Henry Gomersall wrote: Here is the body of a post I made on stackoverflow, but it seems to be a non-obvious issue. I was hoping someone here might be able to shed light on it... On my 32-bit Windows Vista machine I notice a significant (5x) slowdown when taking the absolut

Re: [Numpy-discussion] Getting C-function pointers from Python to C

2012-04-10 Thread Nadav Horesh
Sorry for being slow. There is (I think) a related question I raised on the skimage list: I have a cython function that calls a C callback function in a loop (one call for each pixel in an image). The C function in compiled in a different shared library (a simple C library, not a python module).

Re: [Numpy-discussion] Getting C-function pointers from Python to C

2012-04-10 Thread Nathaniel Smith
On Tue, Apr 10, 2012 at 2:38 PM, Dag Sverre Seljebotn wrote: > On 04/10/2012 03:29 PM, Nathaniel Smith wrote: >> Right, that's what I wasn't getting until you mentioned strcmp :-). >> >> That said, the core numpy dtypes are singletons. For this purpose, the >> signature could be stored as C array

Re: [Numpy-discussion] Getting C-function pointers from Python to C

2012-04-10 Thread Dag Sverre Seljebotn
On 04/10/2012 03:38 PM, Dag Sverre Seljebotn wrote: > On 04/10/2012 03:29 PM, Nathaniel Smith wrote: >> On Tue, Apr 10, 2012 at 2:15 PM, Dag Sverre Seljebotn >>wrote: >>> On 04/10/2012 03:10 PM, Dag Sverre Seljebotn wrote: On 04/10/2012 03:00 PM, Nathaniel Smith wrote: > On Tue, Apr 10

Re: [Numpy-discussion] Getting C-function pointers from Python to C

2012-04-10 Thread Dag Sverre Seljebotn
On 04/10/2012 03:29 PM, Nathaniel Smith wrote: > On Tue, Apr 10, 2012 at 2:15 PM, Dag Sverre Seljebotn > wrote: >> On 04/10/2012 03:10 PM, Dag Sverre Seljebotn wrote: >>> On 04/10/2012 03:00 PM, Nathaniel Smith wrote: On Tue, Apr 10, 2012 at 1:39 PM, Dag Sverre Seljebotn wrote: >>>

Re: [Numpy-discussion] Getting C-function pointers from Python to C

2012-04-10 Thread Nathaniel Smith
On Tue, Apr 10, 2012 at 2:15 PM, Dag Sverre Seljebotn wrote: > On 04/10/2012 03:10 PM, Dag Sverre Seljebotn wrote: >> On 04/10/2012 03:00 PM, Nathaniel Smith wrote: >>> On Tue, Apr 10, 2012 at 1:39 PM, Dag Sverre Seljebotn >>>   wrote: On 04/10/2012 12:37 PM, Nathaniel Smith wrote: > On

Re: [Numpy-discussion] Getting C-function pointers from Python to C

2012-04-10 Thread Dag Sverre Seljebotn
On 04/10/2012 03:10 PM, Dag Sverre Seljebotn wrote: > On 04/10/2012 03:00 PM, Nathaniel Smith wrote: >> On Tue, Apr 10, 2012 at 1:39 PM, Dag Sverre Seljebotn >>wrote: >>> On 04/10/2012 12:37 PM, Nathaniel Smith wrote: On Tue, Apr 10, 2012 at 1:57 AM, Travis Oliphant wrote: >

Re: [Numpy-discussion] Getting C-function pointers from Python to C

2012-04-10 Thread Dag Sverre Seljebotn
On 04/10/2012 03:00 PM, Nathaniel Smith wrote: > On Tue, Apr 10, 2012 at 1:39 PM, Dag Sverre Seljebotn > wrote: >> On 04/10/2012 12:37 PM, Nathaniel Smith wrote: >>> On Tue, Apr 10, 2012 at 1:57 AM, Travis Oliphant >>> wrote: On Apr 9, 2012, at 7:21 PM, Nathaniel Smith wrote: .

Re: [Numpy-discussion] [OFFTOPIC] creating/working NumPy-ndarrays in C++

2012-04-10 Thread Hänel Nikolaus Valentin
* Chris Barker [2012-04-09]: > 2012/4/9 Hänel Nikolaus Valentin : > > http://www.eos.ubc.ca/research/clouds/software/pythonlibs/num_util/num_util_release2/Readme.html > >> > >> that looks like it hasn't been updated since 2006 -- I"d say that > >> makes it a non-starter > > > > Yeah, thats what I

Re: [Numpy-discussion] Getting C-function pointers from Python to C

2012-04-10 Thread Nathaniel Smith
On Tue, Apr 10, 2012 at 1:39 PM, Dag Sverre Seljebotn wrote: > On 04/10/2012 12:37 PM, Nathaniel Smith wrote: >> On Tue, Apr 10, 2012 at 1:57 AM, Travis Oliphant  wrote: >>> On Apr 9, 2012, at 7:21 PM, Nathaniel Smith wrote: >>> >>> ...isn't this an operation that will be performed once per compil

[Numpy-discussion] Why is numpy.abs so much slower on complex64 than complex128 under windows 32-bit?

2012-04-10 Thread Henry Gomersall
Here is the body of a post I made on stackoverflow, but it seems to be a non-obvious issue. I was hoping someone here might be able to shed light on it... On my 32-bit Windows Vista machine I notice a significant (5x) slowdown when taking the absolute values of a fairly large |numpy.complex64|

Re: [Numpy-discussion] Getting C-function pointers from Python to C

2012-04-10 Thread Dag Sverre Seljebotn
On 04/10/2012 12:37 PM, Nathaniel Smith wrote: > On Tue, Apr 10, 2012 at 1:57 AM, Travis Oliphant wrote: >> On Apr 9, 2012, at 7:21 PM, Nathaniel Smith wrote: >> >> ...isn't this an operation that will be performed once per compiled >> function? Is the overhead of the easy, robust method (calling

Re: [Numpy-discussion] Getting C-function pointers from Python to C

2012-04-10 Thread Dag Sverre Seljebotn
Hi Travis, we've been discussing almost the exact same thing in Cython (on a workshop, not on the mailing list, I'm afraid). Our specific example-usecase was passing a Cython function to scipy.integrate. On 04/10/2012 02:57 AM, Travis Oliphant wrote: > > On Apr 9, 2012, at 7:21 PM, Nathaniel Sm

Re: [Numpy-discussion] Getting C-function pointers from Python to C

2012-04-10 Thread Robert Kern
On Tue, Apr 10, 2012 at 01:11, Travis Oliphant wrote: >        1) Create an API for such Ctypes function pointers in NumPy and use > the ctypes object structure.  If ctypes were to ever change it's object > structure we would have to adapt this API. > >        Something like this is what is env

Re: [Numpy-discussion] Getting C-function pointers from Python to C

2012-04-10 Thread Nathaniel Smith
On Tue, Apr 10, 2012 at 1:57 AM, Travis Oliphant wrote: > On Apr 9, 2012, at 7:21 PM, Nathaniel Smith wrote: > > ...isn't this an operation that will be performed once per compiled > function? Is the overhead of the easy, robust method (calling ctypes.cast) > actually measurable as compared to, yo

Re: [Numpy-discussion] Masked Arrays in NumPy 1.x

2012-04-10 Thread Eric Firing
On 04/09/2012 06:52 PM, Travis Oliphant wrote: > Hey all, > > I've been waiting for Mark Wiebe to arrive in Austin where he will > spend several weeks, but I also know that masked arrays will be only > one of the things he and I are hoping to make head-way on while he is > in Austin.Nevertheles