projects
/
aubio.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
5039244
)
[py] add helper to check if we are on a 32bit system
author
Paul Brossier
<piem@piem.org>
Fri, 21 Jun 2019 12:03:49 +0000
(14:03 +0200)
committer
Paul Brossier
<piem@piem.org>
Fri, 21 Jun 2019 12:03:49 +0000
(14:03 +0200)
python/tests/utils.py
patch
|
blob
|
history
diff --git
a/python/tests/utils.py
b/python/tests/utils.py
index
4b41488
..
7606404
100644
(file)
--- a/
python/tests/utils.py
+++ b/
python/tests/utils.py
@@
-3,11
+3,15
@@
import os
import re
import glob
import os
import re
import glob
+import struct
import numpy as np
from tempfile import mkstemp
DEFAULT_SOUND = '22050Hz_5s_brownnoise.wav'
import numpy as np
from tempfile import mkstemp
DEFAULT_SOUND = '22050Hz_5s_brownnoise.wav'
+def is32bit():
+ return struct.calcsize("P") * 8 == 32
+
def array_from_text_file(filename, dtype = 'float'):
realpathname = os.path.join(os.path.dirname(__file__), filename)
return np.loadtxt(realpathname, dtype = dtype)
def array_from_text_file(filename, dtype = 'float'):
realpathname = os.path.join(os.path.dirname(__file__), filename)
return np.loadtxt(realpathname, dtype = dtype)