Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 125 lines (95 sloc) 4.328 kb
9df1719 kwgoodman Renamed package from DSNA to Bottleneck.
authored
1 ==========
2 Bottleneck
3 ==========
3f68aff kwgoodman Initial commit of Nanny prototype.
authored
4
e3a4c63 kwgoodman shorten and update readme
authored
5 Bottleneck is a collection of fast NumPy array functions written in Cython.
3846b3f kwgoodman Update readme for change in project direction.
authored
6
9df1719 kwgoodman Renamed package from DSNA to Bottleneck.
authored
7 Let's give it a try. Create a NumPy array::
de98870 kwgoodman DOC update readme for numpy 1.7.1
authored
8
3846b3f kwgoodman Update readme for change in project direction.
authored
9 >>> import numpy as np
10 >>> arr = np.array([1, 2, np.nan, 4, 5])
11
5807299 kwgoodman Replace move_sum() by move_nanmean().
authored
12 Find the nanmean::
3846b3f kwgoodman Update readme for change in project direction.
authored
13
9df1719 kwgoodman Renamed package from DSNA to Bottleneck.
authored
14 >>> import bottleneck as bn
4f72f8e kwgoodman Added back nan prefix to function names.
authored
15 >>> bn.nanmean(arr)
6d724e6 kwgoodman Doc tweaks.
authored
16 3.0
3846b3f kwgoodman Update readme for change in project direction.
authored
17
e3a4c63 kwgoodman shorten and update readme
authored
18 Moving window mean::
3846b3f kwgoodman Update readme for change in project direction.
authored
19
e3a4c63 kwgoodman shorten and update readme
authored
20 >>> bn.move_mean(arr, window=2, min_count=1)
21 array([ 1. , 1.5, 2. , 4. , 4.5])
3846b3f kwgoodman Update readme for change in project direction.
authored
22
4f4d2f6 kwgoodman update readme
authored
23 Benchmark
24 =========
3846b3f kwgoodman Update readme for change in project direction.
authored
25
e3a4c63 kwgoodman shorten and update readme
authored
26 Bottleneck comes with a benchmark suite::
de98870 kwgoodman DOC update readme for numpy 1.7.1
authored
27
d4c25fb kwgoodman update readme
authored
28 >>> bn.bench()
9df1719 kwgoodman Renamed package from DSNA to Bottleneck.
authored
29 Bottleneck performance benchmark
93061e6 kwgoodman set release date (bn 1.0.0) to today!
authored
30 Bottleneck 1.0.0
d4c25fb kwgoodman update readme
authored
31 Numpy (np) 1.9.1
407fe94 kwgoodman get benchmark working
authored
32 Speed is NumPy time divided by Bottleneck time
90f2b14 kwgoodman less verbose benchmark
authored
33 NaN means approx one-third NaNs; float64 and axis=-1 are used
84d8df1 kwgoodman Make benchmark output more compact.
authored
34
f099a81 kwgoodman add move_max and move_nanmax
authored
35 no NaN no NaN NaN NaN
35a8c65 kwgoodman tweak benchmark output format
authored
36 (10,) (1000,1000) (10,) (1000,1000)
f496c31 kwgoodman make rankdata benchmark more fair
authored
37 nansum 36.5 4.0 36.6 9.1
38 nanmean 144.5 5.2 146.1 9.2
39 nanstd 253.2 4.3 253.1 8.4
40 nanvar 241.4 4.2 241.2 8.4
41 nanmin 30.6 1.1 30.5 1.7
42 nanmax 32.1 1.1 32.2 2.9
43 median 43.3 0.8 45.7 0.9
44 nanmedian 58.7 2.8 67.5 6.8
45 ss 14.3 3.5 14.4 3.4
46 nanargmin 60.8 4.1 61.1 7.3
47 nanargmax 61.4 4.1 61.3 9.0
48 anynan 12.9 1.0 13.5 89.2
49 allnan 13.6 98.5 13.5 97.8
50 rankdata 45.5 1.4 45.9 1.9
51 nanrankdata 60.7 26.3 54.1 37.9
e17e3de kwgoodman use np.partition in bn.bench and bn.slow
authored
52 partsort 6.4 0.9 6.5 1.1
53 argpartsort 3.3 0.7 3.3 0.5
f496c31 kwgoodman make rankdata benchmark more fair
authored
54 replace 9.9 1.2 9.9 1.2
55 move_sum 276.1 121.1 283.2 330.9
56 move_mean 714.4 95.7 723.7 415.8
57 move_std 1102.5 56.2 1160.7 749.0
58 move_min 207.0 20.9 211.0 55.2
59 move_max 213.8 21.4 218.4 118.6
60 move_median 457.9 43.4 452.7 208.4
c710f83 kwgoodman Fallback to non-Cython functions for unsupported ndim/dtype.
authored
61
9593ac4 kwgoodman unit tests are running
authored
62 Only arrays with data type (dtype) int32, int64, float32, and float64 are
d4c25fb kwgoodman update readme
authored
63 accelerated. All other dtypes result in calls to slower, unaccelerated
64 functions.
c3d0d0f Stephan Hoyer Update README and RELEASE notes with NDIM_MAX
shoyer authored
65
4f4d2f6 kwgoodman update readme
authored
66 Where
67 =====
614571c kwgoodman Add URLs to doc.
authored
68
f41af0d kwgoodman Embed function signatures in docstrings and other doc tweaks.
authored
69 =================== ========================================================
70 download http://pypi.python.org/pypi/Bottleneck
71 docs http://berkeleyanalytics.com/bottleneck
72 code http://github.com/kwgoodman/bottleneck
73 mailing list http://groups.google.com/group/bottle-neck
74 =================== ========================================================
3f68aff kwgoodman Initial commit of Nanny prototype.
authored
75
4f08489 kwgoodman tweak readme
authored
76 License
77 =======
78
79 Bottleneck is distributed under a Simplified BSD license. See the LICENSE file
80 for details.
81
614571c kwgoodman Add URLs to doc.
authored
82 Install
83 =======
3f68aff kwgoodman Initial commit of Nanny prototype.
authored
84
4f72f8e kwgoodman Added back nan prefix to function names.
authored
85 Requirements:
86
f41af0d kwgoodman Embed function signatures in docstrings and other doc tweaks.
authored
87 ======================== ====================================================
4f4d2f6 kwgoodman update readme
authored
88 Bottleneck Python 2.7, 3.4; **NumPy 1.9.1**
89 Compile gcc or clang or MinGW
da137ff kwgoodman DOC tweak
authored
90 Unit tests nose
91 ======================== ====================================================
92
93 Optional:
94
95 ======================== ====================================================
6e5b122 kwgoodman `make sdist` and `tox` now work
authored
96 tox, virtualenv Run unit tests across multiple python/numpy versions
97 Cython Development of bottleneck
f41af0d kwgoodman Embed function signatures in docstrings and other doc tweaks.
authored
98 ======================== ====================================================
4f72f8e kwgoodman Added back nan prefix to function names.
authored
99
4f4d2f6 kwgoodman update readme
authored
100 To install Bottleneck on GNU/Linux, Mac OS X, et al.::
3f68aff kwgoodman Initial commit of Nanny prototype.
authored
101
102 $ python setup.py build
103 $ sudo python setup.py install
de98870 kwgoodman DOC update readme for numpy 1.7.1
authored
104
4f4d2f6 kwgoodman update readme
authored
105 To install bottleneck on Windows, first install MinGW and add it to your
106 system path. Then install Bottleneck with the commands::
3f68aff kwgoodman Initial commit of Nanny prototype.
authored
107
108 python setup.py build --compiler=mingw32
109 python setup.py install
110
4f4d2f6 kwgoodman update readme
authored
111 Alternatively, you can use the Windows binaries created by Christoph Gohlke:
112 http://www.lfd.uci.edu/~gohlke/pythonlibs/#bottleneck
113
114 Unit tests
115 ==========
3f68aff kwgoodman Initial commit of Nanny prototype.
authored
116
9df1719 kwgoodman Renamed package from DSNA to Bottleneck.
authored
117 After you have installed Bottleneck, run the suite of unit tests::
3f68aff kwgoodman Initial commit of Nanny prototype.
authored
118
9df1719 kwgoodman Renamed package from DSNA to Bottleneck.
authored
119 >>> import bottleneck as bn
120 >>> bn.test()
3f68aff kwgoodman Initial commit of Nanny prototype.
authored
121 <snip>
65b47d2 kwgoodman add bn.allnan()
authored
122 Ran 79 tests in 70.712s
3f68aff kwgoodman Initial commit of Nanny prototype.
authored
123 OK
65b47d2 kwgoodman add bn.allnan()
authored
124 <nose.result.TextTestResult run=79 errors=0 failures=0>
Something went wrong with that request. Please try again.