From 093ec301aa38f59bb64b37a0ddaa85e4f993c633 Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Wed, 14 Mar 2012 22:36:21 -0400 Subject: [PATCH] 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. --- pycomedi/calibration.pyx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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: -- 2.26.2