[SciPy-User] [ANN] Bottleneck 0.5.0beta
Keith Goodman
kwgoodman at gmail.com
Sat Jun 4 16:48:27 EDT 2011
On Sat, Jun 4, 2011 at 12:52 PM, Christoph Gohlke <cgohlke at uci.edu> wrote:
>
>
> On 6/4/2011 11:44 AM, Keith Goodman wrote:
>>
>> I don't know if there are any Bottleneck users out there but I do know
>> that the Bottleneck 0.4 release was a mess (0.4.0, 0.4.1, 0.4.2,
>> 0.4.3). So this time around I've made a beta release of Bottleneck
>> 0.5:
>>
>>
>> https://github.com/downloads/kwgoodman/bottleneck/Bottleneck-0.5.0beta.tar.gz
>>
>> Reports of success or failure of bottleneck.test() are appreciated.
>>
>> *Release date: Not yet released, in development*
>>
>> The fifth release of bottleneck adds four new functions, comes in a
>> single source distribution instead of separate 32 and 64 bit versions,
>> and fixes a bug in nanmedian:
>>
>> **New functions**
>>
>> - move_median(), moving window median
>> - partsort(), partial sort
>> - argpartsort()
>> - ss(), sum of squares, faster version of scipy.stats.ss
>>
>> **Changes**
>>
>> - Single source distribution instead of separate 32 and 64 bit versions
>> - nanmax and nanmin now follow Numpy 1.6 (not 1.5.1) when input is all NaN
>>
>> **Bug fixes**
>>
>> - #14 Support python 2.5 by importing `with` statement
>> - #22 nanmedian wrong for particular ordering of NaN and non-NaN elements
>
>
> Hi Keith,
>
> the code currently fails to compile with msvc9 on Windows. A patch is
> attached.
>
> bottleneck.test() passes all 80 tests in ~30s.
>
> In move_median.c, _size_t is defined as 64 bit npy_int64 even on 32 bit
> systems. Is that intended?
Thank you, Christoph.
You changed inline to __inline in the C code. I read that __inline is
vendor specific and not a C99 keyword. Does anyone know if __inline
inlines the code with gcc?
You also changed:
# Is the OS 32 or 64 bits?
-if np.int_ == np.int32:
+if tuple.__itemsize__ == 4:
bits = '32'
-elif np.int_ == np.int64:
+elif tuple.__itemsize__ == 8:
bits = '64'
else:
raise ValueError("Your OS does not appear to be 32 or 64 bits.")
Will that always work for Numpy? If so I use it in several places and
will make the change.
As for the npy_int64 question, I don't know. I am confused about
dtypes in move_median. The C code only uses float64 for data values
yet it works fine for int dtype. I guess cython is doing the casting
for me somewhere. I thought I'd have to have separate versions of the
C code for each dtype.
Are there problems with using npy_int64 of 32 bit systems?
More information about the SciPy-User
mailing list