it would require some refactoring of the code to make it work with masked
arrays. I would certainly do that, but its not something I can do before
this release.

I am not sure why there is so much concern over setting the error level
differently; its not like if it gets an invalid comparison and the error
level is set to ignore, it will somehow give us an incorrect value. The
output will still be a nan, its just that it won't give the user a totally
uninformative error on the question.

That said, if there is a better way to do this in the short term I am happy
to change.

On Tue, Dec 10, 2013 at 11:15 AM, Jai Ram Rideout
<notifications@github.com>wrote:

> In scripts/test_group_significance.py:
>
> > +    sync_biom_and_mf)
> > +from qiime.pycogent_backports.test import (benjamini_hochberg_step_down,
> > +    bonferroni_correction)
> > +from qiime.otu_significance import (get_sample_cats, get_sample_indices,
> > +    get_cat_sample_groups, group_significance_row_generator,
> > +    group_significance_output_formatter,
> > +    sort_by_pval, run_group_significance_test,
> > +    TWO_GROUP_TESTS, GROUP_TEST_CHOICES)
> > +from qiime.parse import parse_mapping_file_to_dict
> > +from biom.parse import parse_biom_table
> > +from numpy import array, where, seterr
> > +
> > +# set invalid comparisons error level to ignore. when nans are compared they
> > +# frequently trigger this error. its not informative from the user perspective
> > +# and likely will trigger a bunch of forum posts.
> > +seterr(invalid='ignore')
>
> This is scary, though I agree we don't want a bunch of warnings dumped on
> the user.
>
> What is the recommended way of handling this in numpy? Is it possible to
> promote these warnings to errors and then explicitly catch them in the
> appropriate places in the code? Or maybe use a masked array instead of
> filling with nans?
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/qiime/qiime/pull/1091/files#r8240936>
> .
>