Skip to content

Commit

Permalink
ENH: special: make SpecialFunctionWarning always emitted by default
Browse files Browse the repository at this point in the history
This should reduce confusion --- whether the warning is emitted or not
is already user-controlled by errprint(), and the default behavior of
Python warnings may be unexpected.
  • Loading branch information
pv committed Nov 4, 2012
1 parent 0afa284 commit 93750a9
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions scipy/special/basic.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
import types
import specfun
import orthogonal
import warnings

__all__ = ['agm', 'ai_zeros', 'assoc_laguerre', 'bei_zeros', 'beip_zeros',
'ber_zeros', 'bernoulli', 'berp_zeros', 'bessel_diff_formula',
Expand All @@ -33,6 +34,7 @@

class SpecialFunctionWarning(Warning):
pass
warnings.simplefilter("always", category=SpecialFunctionWarning)

def errprint(inflag=None):
_ufuncs_cxx._errprint(inflag)
Expand Down

0 comments on commit 93750a9

Please sign in to comment.