from .slicing import *
class fvec(numpy.ndarray):
- " a simple numpy array holding a vector of float32 "
+ """a simple numpy array holding a vector of %s""" % float_type
+
def __new__(self, length = 1024, **kwargs):
self.length = length
if type(length) == type([]):
- return numpy.array(length, dtype='float32', **kwargs)
- return numpy.zeros(length, dtype='float32', **kwargs)
+ return numpy.array(length, dtype = float_type, **kwargs)
+ return numpy.zeros(length, dtype = float_type, **kwargs)