mirror of
https://github.com/wassname/catalyst.git
synced 2026-07-14 11:15:09 +08:00
BUG: Fixing bitness issues on 32-bit systems
by being explicit with sizes
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
from numpy import (
|
||||
float64,
|
||||
uint32
|
||||
uint32,
|
||||
int64,
|
||||
)
|
||||
from bcolz import ctable
|
||||
|
||||
@@ -37,8 +38,9 @@ class DailyBarWriterFromDataFrames(BcolzDailyBarWriter):
|
||||
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)
|
||||
self.check_uint_safe(arrmax.view(int64) / nanos_per_second,
|
||||
colname)
|
||||
return (array.view(int64) / nanos_per_second).astype(uint32)
|
||||
|
||||
@staticmethod
|
||||
def check_uint_safe(value, colname):
|
||||
|
||||
Reference in New Issue
Block a user