2009/5/24 Eric Firing <efir...@hawaii.edu>:
>> OK, that would work. Although I think a named argument might be a more
>> transparent way to specify behaviour than setting the warnings.
>
> I agree; using a warning strikes me as an abuse of the warnings
> mechanism.  Instead of a "strict" flag, which I find not particularly
> expressive--what is it being "strict" about?--how about a "min_count"
> kwarg to go with the existing "count" kwarg?

Warnings are a great way of telling the user that a non-fatal problem
cropped up.  It isn't easy to send information along with an
exception, so I don't think raising an error here is ever particularly
useful.

Maybe we should provide tools in NumPy to handle warnings more easily?
 Something like

with no_warnings:
    np.fromfile('x')

or

with raise_warnings:
    np.fromfile('x')

?

Regards
Stéfan
_______________________________________________
Numpy-discussion mailing list
Numpy-discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion

Reply via email to