Merge pull request #254 from campagnola/numpy-fix

Numpy fix
This commit is contained in:
Luke Campagnola 2016-01-02 11:04:00 -08:00
commit 8803a93800

View File

@ -826,7 +826,7 @@ def rescaleData(data, scale, offset, dtype=None):
#p = np.poly1d([scale, -offset*scale])
#data = p(data).astype(dtype)
d2 = data-offset
d2 *= scale
np.multiply(d2, scale, out=d2, casting="unsafe")
data = d2.astype(dtype)
return data