QInfer / python-qinfer

Library for Bayesian inference via sequential Monte Carlo for quantum parameter estimation.
BSD 3-Clause "New" or "Revised" License
92 stars 31 forks source link

Fixed bug in test_smc.py #116

Closed ihincks closed 7 years ago

ihincks commented 7 years ago

Python 2.7 and 3.5 require numpy slice bounds to have integer type, but np.ceil outputs a float; this PR adds an explicit cast.

coveralls commented 7 years ago

Coverage Status

Coverage remained the same at 67.713% when pulling b7441705e2f0be87b4aa57953ea11b340f7b3214 on ihincks:fix-test_smc-slice-bug into ddac8218f5367f303a7e98e191fbf4b7731e2af5 on QInfer:master.

cgranade commented 7 years ago

I suspect this was probably a recent upgrade on NumPy's end, they've issued DeprecationWarnings on non-integer slicing for a while, but those warnings tend to get lost in the noise. Thanks for taking point on this!