From: W. Trevor King Date: Thu, 15 Mar 2012 02:36:21 +0000 (-0400) Subject: Use utility.lsample instead of numpy.uint in calibration._convert(). X-Git-Tag: 0.4~2 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=093ec301aa38f59bb64b37a0ddaa85e4f993c633;p=pycomedi.git Use utility.lsample instead of numpy.uint in calibration._convert(). Don't repeat yourself! Also, numpy.uint is a uint64 on my amd64, and that does not match with lsampl_t. --- diff --git a/pycomedi/calibration.pyx b/pycomedi/calibration.pyx index 953fee5..6e046a8 100644 --- a/pycomedi/calibration.pyx +++ b/pycomedi/calibration.pyx @@ -26,8 +26,8 @@ import numpy as _numpy cimport _comedi_h cimport _comedilib_h -import constant as _constant - +import constant as _constant +import utility as _utility cdef void _setup_comedi_polynomial_t( _comedilib_h.comedi_polynomial_t *p, coefficients, expansion_origin): @@ -57,7 +57,7 @@ cdef object _convert( if to_physical: dtype = _numpy.double else: - dtype = _numpy.uint + dtype = _utility.lsampl array = _numpy.array(data, dtype=dtype) for i,d in enumerate(data): if to_physical: