8000 BUG: fix brentq doesn't raise error in singlediode by mikofski · Pull Request #556 · pvlib/pvlib-python · GitHub
[go: up one dir, main page]

Skip to content

BUG: fix brentq doesn't raise error in singlediode #556

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

Merged
merged 1 commit into from
Sep 4, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
BUG: fix brentq doesn't raise error in singlediode
* if `brentq` is called in `singlediode.py` but no SciPy, then should raise an exception
* currently using `NotImplemented` raises TypeError: 'NotImplementedType' object is not callable because `NotImplemented` is a constant
  • Loading branch information
mikofski authored Sep 4, 2018
commit 65938f7647d6445c590870e3d9e72415970af6f8
3 changes: 2 additions & 1 deletion pvlib/singlediode.py
5EBD
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@
try:
from scipy.optimize import brentq
except ImportError:
brentq = NotImplemented
def brentq(): raise NotImplementedError(
"brentq can't be imported because scipy isn't installed")

# FIXME: change this to newton when scipy-1.2 is released
try:
Expand Down
0