Index: python/tests/test_specdesc.py
===================================================================
--- python/tests/test_specdesc.py	(revision 8e9cb57943fd56c7270308df786b6e1e48e49fb2)
+++ python/tests/test_specdesc.py	(revision c4b2183510f37285509236ed14bdff7f4e3c6957)
@@ -3,5 +3,5 @@
 from numpy.testing import TestCase, assert_equal, assert_almost_equal
 from numpy import random, arange, log, zeros
-from aubio import specdesc, cvec
+from aubio import specdesc, cvec, float_type
 from math import pi
 
@@ -38,6 +38,6 @@
           #print "%20s" % method, str(o(spec))
           o(spec)
-          spec.norm = random.random_sample((len(spec.norm),)).astype('float32')
-          spec.phas = random.random_sample((len(spec.phas),)).astype('float32')
+          spec.norm = random.random_sample((len(spec.norm),)).astype(float_type)
+          spec.phas = random.random_sample((len(spec.phas),)).astype(float_type)
           #print "%20s" % method, str(o(spec))
           assert (o(spec) != 0.)
@@ -61,5 +61,5 @@
         # phase of zeros is zero
         assert_equal (o(spec), 0.)
-        spec.phas = random.random_sample((len(spec.phas),)).astype('float32')
+        spec.phas = random.random_sample((len(spec.phas),)).astype(float_type)
         # phase of random is not zero
         spec.norm[:] = 1
@@ -71,5 +71,5 @@
         # specdiff of zeros is zero
         assert_equal (o(spec), 0.)
-        spec.phas = random.random_sample((len(spec.phas),)).astype('float32')
+        spec.phas = random.random_sample((len(spec.phas),)).astype(float_type)
         # phase of random is not zero
         spec.norm[:] = 1
@@ -80,5 +80,5 @@
         c = cvec()
         assert_equal( 0., o(c))
-        a = arange(c.length, dtype='float32')
+        a = arange(c.length, dtype=float_type)
         c.norm = a
         assert_equal (a, c.norm)
@@ -89,5 +89,5 @@
         c = cvec()
         assert_equal( 0., o(c))
-        a = arange(c.length, dtype='float32')
+        a = arange(c.length, dtype=float_type)
         c.norm = a
         assert_equal (a, c.norm)
@@ -102,5 +102,5 @@
         c = cvec()
         assert_equal( 0., o(c))
-        a = arange(c.length, dtype='float32')
+        a = arange(c.length, dtype=float_type)
         c.norm = a
         assert_almost_equal( sum(a * log(1.+ a/1.e-1 ) ) / o(c), 1., decimal=6)
@@ -110,5 +110,5 @@
         c = cvec()
         assert_equal( 0., o(c))
-        a = arange(c.length, dtype='float32')
+        a = arange(c.length, dtype=float_type)
         c.norm = a
         assert_almost_equal( sum(log(1.+ a/1.e-1 ) ) / o(c), 1, decimal=6)
@@ -118,9 +118,9 @@
         c = cvec()
         assert_equal( 0., o(c))
-        a = arange(c.length, dtype='float32')
+        a = arange(c.length, dtype=float_type)
         c.norm = a
         assert_equal( sum(a), o(c))
         assert_equal( 0, o(c))
-        c.norm = zeros(c.length, dtype='float32')
+        c.norm = zeros(c.length, dtype=float_type)
         assert_equal( 0, o(c))
 
@@ -130,5 +130,5 @@
         # make sure centroid of zeros is zero
         assert_equal( 0., o(c))
-        a = arange(c.length, dtype='float32')
+        a = arange(c.length, dtype=float_type)
         c.norm = a
         centroid = sum(a*a) / sum(a)
@@ -141,5 +141,5 @@
         o = specdesc("spread")
         c = cvec(2048)
-        ramp = arange(c.length, dtype='float32')
+        ramp = arange(c.length, dtype=float_type)
         assert_equal( 0., o(c))
 
@@ -154,5 +154,5 @@
         c = cvec()
         assert_equal( 0., o(c))
-        a = arange(c.length, dtype='float32')
+        a = arange(c.length, dtype=float_type)
         c.norm = a
         centroid = sum(a*a) / sum(a)
@@ -168,5 +168,5 @@
         c = cvec()
         assert_equal( 0., o(c))
-        a = arange(c.length, dtype='float32')
+        a = arange(c.length, dtype=float_type)
         c.norm = a
         centroid = sum(a*a) / sum(a)
@@ -179,6 +179,6 @@
         c = cvec()
         assert_equal( 0., o(c))
-        a = arange(c.length * 2, 0, -2, dtype='float32')
-        k = arange(c.length, dtype='float32')
+        a = arange(c.length * 2, 0, -2, dtype=float_type)
+        k = arange(c.length, dtype=float_type)
         c.norm = a
         num = len(a) * sum(k*a) - sum(k)*sum(a)
@@ -187,5 +187,5 @@
         assert_almost_equal (slope, o(c), decimal = 5)
 
-        a = arange(0, c.length * 2, +2, dtype='float32')
+        a = arange(0, c.length * 2, +2, dtype=float_type)
         c.norm = a
         num = len(a) * sum(k*a) - sum(k)*sum(a)
@@ -194,5 +194,5 @@
         assert_almost_equal (slope, o(c), decimal = 5)
 
-        a = arange(0, c.length * 2, +2, dtype='float32')
+        a = arange(0, c.length * 2, +2, dtype=float_type)
         c.norm = a * 2
         assert_almost_equal (slope, o(c), decimal = 5)
@@ -202,16 +202,16 @@
         c = cvec()
         assert_equal( 0., o(c))
-        a = arange(c.length * 2, 0, -2, dtype='float32')
-        k = arange(c.length, dtype='float32')
+        a = arange(c.length * 2, 0, -2, dtype=float_type)
+        k = arange(c.length, dtype=float_type)
         c.norm = a
         decrease = sum((a[1:] - a [0]) / k[1:]) / sum(a[1:]) 
         assert_almost_equal (decrease, o(c), decimal = 5)
 
-        a = arange(0, c.length * 2, +2, dtype='float32')
+        a = arange(0, c.length * 2, +2, dtype=float_type)
         c.norm = a
         decrease = sum((a[1:] - a [0]) / k[1:]) / sum(a[1:]) 
         assert_almost_equal (decrease, o(c), decimal = 5)
 
-        a = arange(0, c.length * 2, +2, dtype='float32')
+        a = arange(0, c.length * 2, +2, dtype=float_type)
         c.norm = a * 2
         decrease = sum((a[1:] - a [0]) / k[1:]) / sum(a[1:]) 
@@ -222,6 +222,6 @@
         c = cvec()
         assert_equal( 0., o(c))
-        a = arange(c.length * 2, 0, -2, dtype='float32')
-        k = arange(c.length, dtype='float32')
+        a = arange(c.length * 2, 0, -2, dtype=float_type)
+        k = arange(c.length, dtype=float_type)
         c.norm = a
         cumsum = .95*sum(a*a)
