Showing the changes to python (1 of 1 file). Show all
Unified · Split
| @@ -3,11 +3,15 @@ · 2 unmodified lines | ||
| 3 | 3 | import os |
| 4 | 4 | import re |
| 5 | 5 | import glob |
| 6 | +import struct | |
| 6 | 7 | import numpy as np |
| 7 | 8 | from tempfile import mkstemp |
| 8 | 9 | |
| 9 | 10 | DEFAULT_SOUND = '22050Hz_5s_brownnoise.wav' |
| 10 | 11 | |
| 12 | +def is32bit(): | |
| 13 | + return struct.calcsize("P") * 8 == 32 | |
| 14 | + | |
| 11 | 15 | def array_from_text_file(filename, dtype = 'float'): |
| 12 | 16 | realpathname = os.path.join(os.path.dirname(__file__), filename) |
| 13 | 17 | return np.loadtxt(realpathname, dtype = dtype) |