<br><br><div class="gmail_quote">On Sun, Nov 22, 2009 at 8:37 AM,  <span dir="ltr"><<a href="mailto:josef.pktd@gmail.com">josef.pktd@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="im">On Sun, Nov 22, 2009 at 10:25 AM, David Cournapeau <<a href="mailto:cournape@gmail.com">cournape@gmail.com</a>> wrote:<br>
> On Mon, Nov 23, 2009 at 12:14 AM,  <<a href="mailto:josef.pktd@gmail.com">josef.pktd@gmail.com</a>> wrote:<br>
>> On Sun, Nov 22, 2009 at 10:01 AM, David Cournapeau <<a href="mailto:cournape@gmail.com">cournape@gmail.com</a>> wrote:<br>
>>> On Sun, Nov 22, 2009 at 11:45 PM, Charles R Harris<br>
>>> <<a href="mailto:charlesr.harris@gmail.com">charlesr.harris@gmail.com</a>> wrote:<br>
>>>><br>
>>>> Might be nice to print out the actual values of np.spacing and np.nextafter<br>
>>>> here.<br>
>>>><br>
>>><br>
>>> Yes, I should add some utilities to print those for this kind of test.<br>
>>> But in this case, I know the problem: mingw gcc use 80 bits long<br>
>>> double but it uses the MS runtime which considers double and long<br>
>>> double to be the same (8 bytes).<br>
>>><br>
>>> I think the real fix is to force npy_longdouble to be double on mingw,<br>
>>> but I don't want to make that change now for 1.4.0.<br>
>><br>
>> adding the failing type in the test to the failure message would also<br>
>> be helpful<br>
><br>
> Yes, you're right. I also used the nose facility for using generators<br>
> for complex corner cases, but with retrospect, it is not so useful,<br>
> because you don't get a name when you have a failure (or maybe I am<br>
> using it wrong).<br>
<br>
</div>I don't know what the policy for the use of assert in numpy is,<br>
but if you use the function np.testing.assert_ then you can add a<br>
failure message with eg. repr(t)<br>
<br></blockquote><div><br>They should all use assert_ as it is designed to work even in optimized environments. However, this is not enforced, official policy ;) <br></div><br>Chuck<br></div>