-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Nan Changes #89
base: master
Are you sure you want to change the base?
Nan Changes #89
Conversation
@stevevarner Hi, For example: import numpy as np
a = np.array([1, 2, 3, float('NaN'), 5, 6])
b = np.array([1, 2, float('NaN'), 5, 6, 7])
c = numpy.stack((a,b))
numpy.nanmean(c, axis=0)
Out[1]: array([ 1. , 2. , 3. , 5. , 5.5, 6.5])
# versus:
(a+b)/2
Out[2]: array([ 1. , 2. , nan, nan, 5.5, 6.5]) Am I missing something? |
We are wanting it to disregard all NaN values in the mean. |
That would mean that thunder images and series |
No....they would behave the same. numpy.nanmean ignores the NaN values just as what was implemented. |
Hi, from numpy import arange, float32
from bolt import array
x = arange(2*3*4).reshape(2, 3, 4).astype(float32)
b = array(x, sc, axis=(0,))
b.nanmean() gives the error:
Any idea why? Thanks, |
Had an offline chat with @boazmohar about some of this. Given that the goal of For implementation, |
@freeman-lab @jwittenbach looking over code, there is a python 2/3 problem with specifying longs for counters in stats counter. http://python3porting.com/differences.html (see long) import sys
if sys.version_info < (3,):
long = int |
Adding changes to support nanmean, nammin, nanmax, etc.