Open GoogleCodeExporter opened 9 years ago
[deleted comment]
[deleted comment]
It might be more a numpy problem rather than a pyodbc issue. The misbehavior is
due to the fail of PyInt_Check or PyLong_Check on numpy.int32 and numpy.int64.
After some searches, seems it is a well known issue but without a good solution
yet.
Original comment by randomiz...@gmail.com
on 27 Aug 2013 at 9:13
To be honest, the python integers are the ones that are weird. This can easily
be verified with sys.getsizeof. A numpy.int64 is a c integer using 64 bits of
memory. python longs uses an arbitrary number of bits, depending on the
magnitude of the integer. This issue may even cause problems in the database if
you try to insert an integer which is bigger than the database type allows.
Example:
a=long(1000)
b=numpy.int64(a)
sys.getsizeof(a)
sys.getsizeof(b)
c=2**200
d=numpy.int64(c)
sys.getsizeof(c)
Original comment by erlend.a...@gmail.com
on 28 Aug 2013 at 5:44
Original issue reported on code.google.com by
erlend.a...@gmail.com
on 12 Mar 2013 at 7:45