Commit 361aeb9c authored by R.K.Garcia's avatar R.K.Garcia
Browse files

fix py3 implicit floating point divide for array shape

parent a7363464
......@@ -389,7 +389,7 @@ class HimawariScene(object):
def downsample(data, factor, sentinel=np.NAN, first_row=0, first_col=0):
# http://stackoverflow.com/questions/16276268/how-to-pass-a-numpy-array-into-a-cffi-function-and-how-to-get-one-back-out
pdata = ffi.cast("const float *", data.ctypes.data)
new_shape = tuple(x/factor for x in data.shape)
new_shape = tuple(int(x / factor) for x in data.shape)
zult = np.zeros(new_shape, dtype=np.float32)
pzult = ffi.cast("float *", zult.ctypes.data)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment