I'm getting the error mentioned in the title. I have all of the following three imports in my code:
import scipy as sc
import scipy.stats
from scipy import stats
But still get the error. I'm sure it has something to do with the version, but can't figure out either how to make it work or a workaround for "nanmean". Any suggestions would be appreciated.
nanmean was a deprecated function that was removed from scipy.stats in version 0.18.0. You will have to either use an older version of SciPy or use the equivalent function from NumPy.
from numpy import nanmean
nanmean is also available from scipy module itself, so this might work if you replace
from scipy.stats import nanmean
with
from scipy import nanmean
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With