def to_uint32(self, array, colname): arrmax = array.max() if colname in OHLC: self.check_uint_safe(arrmax * 1000, colname) return (array * 1000).astype(uint32) elif colname == 'volume': self.check_uint_safe(arrmax, colname) return array.astype(uint32) elif colname == 'day': nanos_per_second = (1000 * 1000 * 1000) self.check_uint_safe(arrmax.view(int) / nanos_per_second, colname) return (array.view(int) / nanos_per_second).astype(uint32)