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

Include pvarray in __init__.py #1951

Merged
merged 1 commit into from
Jan 23, 2024
Merged

Conversation

kandersolar
Copy link
Member

  • Closes #xxxx
  • I am familiar with the contributing guidelines
  • Tests added
  • Updates entries in docs/sphinx/source/reference for API changes.
  • Adds description and name entries in the appropriate "what's new" file in docs/sphinx/source/whatsnew for all changes. Includes link to the GitHub Issue with :issue:`num` or this Pull Request with :pull:`num`. Includes contributor name and/or GitHub username (link with :ghuser:`user`).
  • New code is fully documented. Includes numpydoc compliant docstrings, examples, and comments where necessary.
  • Pull request is nearly complete and ready for detailed review.
  • Maintainer: Appropriate GitHub Labels (including remote-data) and Milestone are assigned to the Pull Request and linked Issue.

pvlib.pvarray doesn't behave as you might expect:

In [1]: import pvlib

In [2]: pvlib.pvsystem.sapm
Out[2]: <function pvlib.pvsystem.sapm(effective_irradiance, temp_cell, module)>

In [3]: pvlib.pvarray.pvefficiency_adr
Traceback (most recent call last):

  Cell In[3], line 1
    pvlib.pvarray.pvefficiency_adr

AttributeError: module 'pvlib' has no attribute 'pvarray'

This is because it was not listed in the __init__.py file. This one-line PR lists it there so that the behavior becomes:

In [1]: import pvlib

In [2]: pvlib.pvarray.pvefficiency_adr
Out[2]: <function pvlib.pvarray.pvefficiency_adr(effective_irradiance, temp_cell, k_a, k_d, tc_d, k_rs, k_rsh)>

@kandersolar kandersolar added this to the v0.10.4 milestone Jan 23, 2024
@kandersolar kandersolar merged commit 6bb149f into pvlib:main Jan 23, 2024
35 checks passed
@kandersolar kandersolar deleted the init_pvarray branch January 23, 2024 16:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants