Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

filterwarnings #229

Closed
oyamad opened this issue Feb 18, 2016 · 6 comments
Closed

filterwarnings #229

oyamad opened this issue Feb 18, 2016 · 6 comments

Comments

@oyamad
Copy link
Member

oyamad commented Feb 18, 2016

It seems that once quantecon is imported, the warnings the user issues by warnings.warn are ignored, probably because of warnings.filterwarnings('ignore') in arma.py (and there is also warnings.simplefilter("ignore", RuntimeWarning) in matrix_eqn.py).

If it is indeed the case, this is problematic. Is there any way to put warnings.simplefilter in a "local scope"?

@oyamad
Copy link
Member Author

oyamad commented Feb 18, 2016

>>> import warnings
>>> warnings.warn('warning')
__main__:1: UserWarning: warning
>>> import quantecon
>>> warnings.warn('warning')
>>>

@sglyon
Copy link
Member

sglyon commented Feb 18, 2016

We should definitely not be silencing all warnings. I haven't looked, but do we know why we are even expecting to have warnings in arma.py?

@mmcky
Copy link
Contributor

mmcky commented Feb 25, 2016

Comment in arma.py

# == Ignore unnecessary warnings concerning casting complex variables back to
# floats == #

@mmcky
Copy link
Contributor

mmcky commented Feb 25, 2016

Comment in matrix_eqn.py

# == Suppress warnings from checking conditioning of matrices == #

@mmcky
Copy link
Contributor

mmcky commented Feb 25, 2016

I propose we remove the warnings.filterwarnings('ignore') and then deal with any warnings that arise.

@mmcky
Copy link
Contributor

mmcky commented Mar 1, 2016

Closing this issue as discussion has moved to PR #231

@mmcky mmcky closed this as completed Mar 1, 2016
mmcky added a commit that referenced this issue Nov 10, 2016
* Remove warnings supression as noted by Issue #229

* remove the import of warnings module as not needed now
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants