summaryrefslogtreecommitdiff
path: root/numpy/core/src/arrayobject.c
diff options
context:
space:
mode:
authorTravis Oliphant <oliphant@enthought.com>2007-04-01 23:22:15 +0000
committerTravis Oliphant <oliphant@enthought.com>2007-04-01 23:22:15 +0000
commit45b5a6a8f416bf04a710aa74353397ffb3bda1ff (patch)
treebce4a25a3b82830fd3b4554d313ccc425a7517a1 /numpy/core/src/arrayobject.c
parent83d602fdaec3faea5b5a1383064e9504b686389e (diff)
downloadnumpy-45b5a6a8f416bf04a710aa74353397ffb3bda1ff.tar.gz
Do not use floating-point numbers to copy data as it will not work when high-order bits are set that do not fit in the floating-point representation.
Diffstat (limited to 'numpy/core/src/arrayobject.c')
-rw-r--r--numpy/core/src/arrayobject.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/numpy/core/src/arrayobject.c b/numpy/core/src/arrayobject.c
index da9c14f98..199189b8f 100644
--- a/numpy/core/src/arrayobject.c
+++ b/numpy/core/src/arrayobject.c
@@ -324,7 +324,7 @@ _strided_byte_copy(char *dst, intp outstrides, char *src, intp instrides,
switch(elsize) {
case 8:
- _FAST_MOVE(Float64);
+ _FAST_MOVE(Int64);
case 4:
_FAST_MOVE(Int32);
case 1:
@@ -333,8 +333,8 @@ _strided_byte_copy(char *dst, intp outstrides, char *src, intp instrides,
_FAST_MOVE(Int16);
case 16:
for (i=0; i<N; i++) {
- ((Float64 *)tout)[0] = ((Float64 *)tin)[0];
- ((Float64 *)tout)[1] = ((Float64 *)tin)[1];
+ ((Int64 *)tout)[0] = ((Int64 *)tin)[0];
+ ((Int64 *)tout)[1] = ((Int64 *)tin)[1];
tin += instrides;
tout += outstrides;
}