Skip to content

Commit 5de7747

Browse files
committed
auto bin
1 parent bbab8c2 commit 5de7747

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

auto_bin.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
'''
2+
Auto bin number.
3+
'''
4+
import numpy as np
5+
6+
def autoBin(data):
7+
data_range = np.max(data) - np.min(data)
8+
return int(np.ceil(data_range / (np.std(data) / 3)))

readme.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,11 @@ Play audio cues.
156156

157157
[source code](https://github.com/Daniel-Chin/Python_Lib/blob/master/audioCues.py)
158158

159+
## auto_bin.py
160+
Auto bin number.
161+
162+
[source code](https://github.com/Daniel-Chin/Python_Lib/blob/master/auto_bin.py)
163+
159164
## babble.py
160165
Repeatedly prints 'wobo wabble' indefinitely.
161166

0 commit comments

Comments
 (0)