[SciPy-dev] Stopping F2Py from generating verbose output

Pearu Peterson pearu@cens.ioc...
Tue Jan 6 05:40:19 CST 2009

On Mon, January 5, 2009 12:03 am, Stéfan van der Walt wrote:
> Hi all,
> It seems that somewhere along the line f2py inserts debugging prints
> for scipy.lib.blas.fblas.  E.g.
> $ python -c "from scipy.lib.blas import fblas; fblas.zaxpy([1, 2], [3, 4],
> n=4)"
> zaxpy:n=4
> Traceback (most recent call last):
>   File "<string>", line 1, in <module>
> fblas.error: (len(y)-offy>(n-1)*abs(incy)) failed for 1st keyword n
> Does anybody know how to suppress those "zaxpy:n=4" style messages, or
> even just where they are generated?

These messages are generated by f2py generated extension modules
and there is no switch implemented to disable these messages
because they are part of the exception. Sometimes the error message
is not sufficient to determine the cause of the exception and
printing out the actual values of the arguments is useful.
IMHO, a proper solution would be to include the printed messages
to the exception value instead of just removing them.


More information about the Scipy-dev mailing list