import numpy as np
mm = np.memmap('/tmp/test.data', mode='w+', shape=4)
np.average(mm)
Output since 5ceab8f (a couple of days ago):
Output before that (e.g. in 1.10.4):
This causes the scikit-learn using numpy master tests to fail, see this Travis log.
We have been bitten in the past by this in scikit-learn with .sum that has the same surprising behaviour (see scikit-learn/scikit-learn#6225). Shouldn't reduce operations on a memmap array always return a numpy scalar ?
cc @ogrisel.