I am using fastai v0.7 with numpy v1.15+ and noticed that my tests started to fail when numpy recently bumped to v1.16. The relevant part of the error look like this:
../../../virtualenv/python3.6.3/lib/python3.6/site-packages/fastai/learner.py:287: in fit
return self.fit_gen(self.model, self.data, layer_opt, n_cycle, **kwargs)
../../../virtualenv/python3.6.3/lib/python3.6/site-packages/fastai/learner.py:234: in fit_gen
swa_eval_freq=swa_eval_freq, **kwargs)
../../../virtualenv/python3.6.3/lib/python3.6/site-packages/fastai/model.py:160: in fit
print_stats(epoch, [debias_loss] + vals)
../../../virtualenv/python3.6.3/lib/python3.6/site-packages/fastai/model.py:173: in print_stats
values = [epoch] + list(np.round(values, decimals))
../../../virtualenv/python3.6.3/lib/python3.6/site-packages/numpy/core/fromnumeric.py:3382: in round_
return around(a, decimals=decimals, out=out)
../../../virtualenv/python3.6.3/lib/python3.6/site-packages/numpy/core/fromnumeric.py:3007: in around
return _wrapfunc(a, 'round', decimals=decimals, out=out)
../../../virtualenv/python3.6.3/lib/python3.6/site-packages/numpy/core/fromnumeric.py:66: in _wrapfunc
return _wrapit(obj, method, *args, **kwds)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
obj = [4.57860245691305, array([4.04758]), 0.24526315789473685]
method = 'round', args = (), kwds = {'decimals': 6, 'out': None}, wrap = None
def _wrapit(obj, method, *args, **kwds):
try:
wrap = obj.__array_wrap__
except AttributeError:
wrap = None
> result = getattr(asarray(obj), method)(*args, **kwds)
E AttributeError: 'float' object has no attribute 'rint'
../../../virtualenv/python3.6.3/lib/python3.6/site-packages/numpy/core/fromnumeric.py:46: AttributeError
I can make do fine with pinning numpy to v1.15, but just wanted to put this out here for others.