[SciPy-Dev] review request - test noise clean up

Skipper Seabold jsseabold at gmail.com
Wed Jan 12 21:32:04 EST 2011


On Wed, Jan 12, 2011 at 9:20 PM, David <david at silveregg.co.jp> wrote:
> On 01/13/2011 11:01 AM, josef.pktd at gmail.com wrote:
>> On Wed, Jan 12, 2011 at 9:37 AM, Ralf Gommers
>> <ralf.gommers at googlemail.com>  wrote:
>>>
>>>
>>> On Wed, Jan 12, 2011 at 6:25 PM, Ralf Gommers<ralf.gommers at googlemail.com>
>>> wrote:
>>>>
>>>>
>>>> On Wed, Jan 12, 2011 at 6:18 PM, Ralf Gommers
>>>> <ralf.gommers at googlemail.com>  wrote:
>>>>>
>>>>>
>>>>> On Tue, Jan 11, 2011 at 11:44 PM, Charles R Harris
>>>>> <charlesr.harris at gmail.com>  wrote:
>>>>>>
>>>>>>
>>>>>> On Tue, Jan 11, 2011 at 8:32 AM, Ralf Gommers
>>>>>> <ralf.gommers at googlemail.com>  wrote:
>>>>>>>
>>>>>>> Hi,
>>>>>>>
>>>>>>> I cleaned most of the noise in the test output (only stats module and a
>>>>>>> few random ones left): https://github.com/rgommers/scipy/tree/testnoise
>>>>>>> Can someone please check this and confirm that this can go into trunk
>>>>>>> as well as 0.9.x? Especially for the scipy.special commit.
>>
>> Just a suggestion,
>>
>> Is it possible to use a module global DEBUG and silence the warnings
>> only "if not DEBUG"?
>
> I would rather not: those are mostly bugs, and are platform dependent.
> Hiding it by default means we will not be aware of it for platforms we
> don't often use,
>

I've been setting numpy.errstate context manager with kwargs for a
monkey-patched numpy.testing.nosetester.NoseTester.test to suppress
floating point warnings.  And you could also do the same with
warnings.catch_warnings/simplefilter if you *really* want to suppress
all warnings.  If you want to catch the numpy floating point errors in
the stats distributions fit that are known, I think you could just use
errstate there.  This might cut down on some of the true noise.

Skipper



More information about the SciPy-Dev mailing list