We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Is your feature request related to a problem? Please describe.
When a PVSystem has a single Array, you can't assign just the Array instance when constructing the PVSystem.
mount = pvlib.pvsystem.FixedMount(surface_tilt=35, surface_azimuth=180) array = pvlib.pvsystem.Array(mount=mount) pv = pvlib.pvsystem.PVSystem(arrays=array) --------------------------------------------------------------------------- TypeError Traceback (most recent call last) <ipython-input-13-f5424e3db16a> in <module> 3 mount = pvlib.pvsystem.FixedMount(surface_tilt=35, surface_azimuth=180) 4 array = pvlib.pvsystem.Array(mount=mount) ----> 5 pv = pvlib.pvsystem.PVSystem(arrays=array) ~\anaconda3\lib\site-packages\pvlib\pvsystem.py in __init__(self, arrays, surface_tilt, surface_azimuth, albedo, surface_type, module, module_type, module_parameters, temperature_model_parameters, modules_per_string, strings_per_inverter, inverter, inverter_parameters, racking_model, losses_parameters, name) 251 array_losses_parameters, 252 ),) --> 253 elif len(arrays) == 0: 254 raise ValueError("PVSystem must have at least one Array. " 255 "If you want to create a PVSystem instance " TypeError: object of type 'Array' has no len()
Not a bug per se, since the PVSystem docstring requests that arrays be iterable. Still, a bit inconvenient to have to do this
arrays
mount = pvlib.pvsystem.FixedMount(surface_tilt=35, surface_azimuth=180) array = pvlib.pvsystem.Array(mount=mount) pv = pvlib.pvsystem.PVSystem(arrays=[array])
Describe the solution you'd like Handle arrays=array where array is an instance of Array
arrays=array
array
Array
Describe alternatives you've considered Status quo - either make the single Array into a list, or use the PVSystem kwargs.
The text was updated successfully, but these errors were encountered:
Successfully merging a pull request may close this issue.
Is your feature request related to a problem? Please describe.
When a PVSystem has a single Array, you can't assign just the Array instance when constructing the PVSystem.
Not a bug per se, since the PVSystem docstring requests that
arrays
be iterable. Still, a bit inconvenient to have to do thisDescribe the solution you'd like
Handle
arrays=array
wherearray
is an instance ofArray
Describe alternatives you've considered
Status quo - either make the single Array into a list, or use the PVSystem kwargs.
The text was updated successfully, but these errors were encountered: