-
Notifications
You must be signed in to change notification settings - Fork 1.1k
pvfactors_timeseries docstring types are incorrect #1332
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
Comments
@kanderso-nrel My understanding is that array-like should accommodate scalars, in which case I think this means pvfactors is advertising falsely. Thoughts? https://numpy.org/devdocs/reference/typing.html#numpy.typing.ArrayLike |
Oh right, I had forgotten about the inconsistency between how pvlib and numpy each define array-like. #765 is very relevant. Maybe we call it array-like for now until we change the pvlib convention later? I'd also be fine with |
Maybe this is less a docs bug and more a functionality bug. I generally expect pvlib functions to work with scalar orientation values. A better fix may be to allow scalar inputs and to cast scalars to arrays inside the function prior to forwarding them on to pvfactors. |
+1 |
Describe the bug
The pvfactors_timeseries docstring currently lists several parameters as "numeric", implying scalar values are acceptable (docs). However, some parameters cannot actually be scalars and should be listed as "array-like" instead.
To Reproduce
Example showing that scalar inputs for the module orientation parameters are not acceptable:
Click to expand!
Expected behavior
Correct the types in the docstring to accurately reflect pvfactors' requirements.
Additional context
Originally discussed here: #1331 (reply in thread)
Edit: this is more or less a duplicate of #1127
The text was updated successfully, but these errors were encountered: