fix_32bit_ftbfs
authorDebian Astronomy Team <debian-astro-maintainers@lists.alioth.debian.org>
Mon, 26 Nov 2018 11:46:36 +0000 (11:46 +0000)
committerOle Streicher <olebole@debian.org>
Mon, 26 Nov 2018 11:46:36 +0000 (11:46 +0000)
Gbp-Pq: Name fix_32bit_ftbfs.patch

yt/utilities/lib/alt_ray_tracers.pyx
yt/utilities/lib/misc_utilities.pyx

index 099790fab07e20b499fbeb1ba927eeb3cc8f1a44..a86f4a989266b73f3040cfdf2ee6612f9578ff97 100644 (file)
@@ -101,7 +101,7 @@ def cylindrical_ray_trace(np.ndarray[np.float64_t, ndim=1] p1,
                                           rleft, rright, zleft, zright, \
                                           cleft, cright, thetaleft, thetaright, \
                                           tmleft, tpleft, tmright, tpright, tsect
-    cdef np.ndarray[np.int64_t, ndim=1, cast=True] inds, tinds, sinds
+    cdef np.ndarray[np.int_t, ndim=1, cast=True] inds, tinds, sinds
     cdef np.ndarray[np.float64_t, ndim=2] xyz, rztheta, ptemp, b1, b2, dsect
 
     # set up  points
@@ -201,12 +201,12 @@ def cylindrical_ray_trace(np.ndarray[np.float64_t, ndim=1] p1,
     tsect, dsect = _cart_intersect(p1cart, p2cart, _cyl2cart(b1), _cyl2cart(b2))
     tmask = np.logical_and(0.0<=tsect, tsect<=1.0)
     ret = np.unique(tsect[tmask], return_index=True)
-    tsect, tinds = ret[0], ret[1].astype('int64')
+    tsect, tinds = ret[0], ret[1].astype('int')
     inds = inds[tmask][tinds]
     xyz = dsect[tmask][tinds]
     s = np.sqrt(((xyz - p1cart) * (xyz - p1cart)).sum(axis=1))
     ret = np.unique(s, return_index=True)
-    s, sinds = ret[0], ret[1].astype('int64')
+    s, sinds = ret[0], ret[1].astype('int')
     inds = inds[sinds]
     xyz = xyz[sinds]
     t = s/np.sqrt((dpcart*dpcart).sum())
index 37a485928b9087e941ebecb2eced5a22582b2453..8758796b05572c418c95deca5b49cdf37ce0b92f 100644 (file)
@@ -446,7 +446,7 @@ def zpoints(np.ndarray[np.float64_t, ndim=3] image,
     cdef np.float64_t z0
     alpha = np.zeros(4)
     #the sources must be ordered along z to avoid edges when two overlap
-    idx = np.argsort(zs)
+    idx = np.asarray(np.argsort(zs), dtype='int64')
     for j in idx:
         r = radii[j]
         r2 = int((r+0.3)*(r+0.3))  #0.3 to get nicer shape