[Numpy-discussion] np.hist with masked values

Tim Michelsen timmichelsen@gmx-topmail...
Tue Sep 1 11:50:31 CDT 2009

should creating a histogram with masked data be different that one cretated with
unmasked data?
Is np.hist tuned for work with historams?

I R_project I would do:

# Note: values is my dataset

### masking zeros
values_mask=ifelse(values==0, NA, (values))

# http://stat.ethz.ch/R-manual/R-patched/library/stats/html/ecdf.html
plot(ecdf(values_mask), main="Emprical cumulative distribution function",
do.points=F, xlab='Data Values')

There masking the zeros has an effect. With pure numpy not.

Thanks in advance for any comment.


More information about the NumPy-Discussion mailing list