[Numpy-discussion] ufuncs on funny strides; also isnan, isfinite, etc on a variety of dtypes

2010-04-01 Thread M Trumpis
Hi all, disclaimer: pardon my vast ignorance on the subject of ufuncs, that will explain the naivety of the following questions This morning I was looking at this line of code, which was running quite slow for me and making me think data_has_nan = numpy.isnan(data_array).any() I knew that the

Re: [Numpy-discussion] ufuncs on funny strides; also isnan, isfinite, etc on a variety of dtypes

2010-04-01 Thread Warren Weckesser
M Trumpis wrote: Hi all, snip And a last mini question, it doesn't appear that any() is doing short circuit evaluation. It runs in appx the same time whether an array is sparsely nonzero, fully zero, or fully nonzero. That's not what I see. Here's an example that shows the a linear

Re: [Numpy-discussion] ufuncs on funny strides; also isnan, isfinite, etc on a variety of dtypes

2010-04-01 Thread M Trumpis
On Thu, Apr 1, 2010 at 11:53 AM, Warren Weckesser warren.weckes...@enthought.com wrote: M Trumpis wrote: Hi all, snip And a last mini question, it doesn't appear that any() is doing short circuit evaluation. It runs in appx the same time whether an array is sparsely nonzero, fully zero, or

Re: [Numpy-discussion] ufuncs on funny strides; also isnan, isfinite, etc on a variety of dtypes

2010-04-01 Thread Anne Archibald
On 1 April 2010 14:30, M Trumpis mtrum...@berkeley.edu wrote: Hi all, disclaimer: pardon my vast ignorance on the subject of ufuncs, that will explain the naivety of the following questions This morning I was looking at this line of code, which was running quite slow for me and making me