Page MenuHomeSolus

Update python-bottleneck to 1.3.2 and remove python2 support
ClosedPublic

Authored by algent on Wed, Jun 24, 9:13 PM.

Details

Summary

python-bottleneck is required only by python-pandas, which is built with python3.

Full changelog here

Signed-off-by: Algent Albrahimi <algent@protonmail.com>

Test Plan
  • Run a few examples:
>>> import numpy as np
>>> a = np.array([1, 2, np.nan, 4, 5])
>>> import bottleneck as bn
>>> bn.nanmean(a)
3.0
>>> bn.move_mean(a, window=2, min_count=1)
array([1. , 1.5, 2. , 4. , 4.5])
  • Run benchmark
>>> bn.bench()
Bottleneck performance benchmark
    Bottleneck 1.3.2; Numpy 1.16.6
    Speed is NumPy time divided by Bottleneck time
    NaN means approx one-fifth NaNs; float64 used

              no NaN     no NaN      NaN       no NaN      NaN    
               (100,)  (1000,1000)(1000,1000)(1000,1000)(1000,1000)
               axis=0     axis=0     axis=0     axis=1     axis=1  

nansum         53.2        1.5        1.8        4.3        3.5
nanmean       137.9        2.2        2.4        5.6        4.2
nanstd        213.8        2.9        2.5        5.5        4.2
nanvar        213.6        2.5        2.5        5.7        4.4
nanmin         44.3        0.5        0.9        1.1        2.1
nanmax         44.9        0.4        1.0        1.5        2.0
median        138.5        1.5        4.2        1.3        5.4
nanmedian     131.4        7.3        8.8        7.9       10.6
ss             27.8        1.6        1.7        3.8        3.7
nanargmin      78.2        3.4        4.6        3.9        7.3
nanargmax      87.1        3.1        4.2        4.4        7.2
anynan         18.3        0.5       99.7        1.3      108.0
allnan         24.5      350.1      250.6      266.4      179.6
rankdata       38.4        2.4        2.6        2.9        3.0
nanrankdata    40.8        2.7        2.6        3.2        3.2
partition       3.2        1.2        1.5        1.0        1.3
argpartition    3.5        0.9        1.1        1.0        1.4
replace         9.5        0.7        0.7        0.7        0.7
.
.
.

Diff Detail

Repository
R3707 python-bottleneck
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

algent created this revision.Wed, Jun 24, 9:13 PM
algent requested review of this revision.Wed, Jun 24, 9:13 PM
algent edited the test plan for this revision. (Show Details)Wed, Jun 24, 9:13 PM
JoshStrobl accepted this revision.Fri, Jun 26, 9:23 AM
JoshStrobl added a subscriber: JoshStrobl.

LGTM and thank you for the test plan.

This revision is now accepted and ready to land.Fri, Jun 26, 9:23 AM