You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
pvlib has a policy that the output type should be as similar as possible to the input type. So, for all scalar input, most functions should return a scalar output. However, some functions return ndim=0 array outputs instead of true scalars. I know this happens with irradiance.perez, but I think it happens with a handful of functions.
@mikofski Thanks for pushing on that vectorized newton in scipy, it has been quite useful. I am a bit concerned about the different output formats in the scalar vs. vectorized cases, however. Seems like that leads to the same issue we are discussing here.
Thanks @markcampanelli for raising the issue with numpy and bringing it to my attention here. I'm less convinced that we should put much effort into it within pvlib.
Activity
markcampanelli commentedon Jan 19, 2019
This is a bit of a PITA: numpy/numpy#12636
mikofski commentedon Jan 19, 2019
I recently got bit by this too in scipy
markcampanelli commentedon Jan 19, 2019
@mikofski Thanks for pushing on that vectorized newton in scipy, it has been quite useful. I am a bit concerned about the different output formats in the scalar vs. vectorized cases, however. Seems like that leads to the same issue we are discussing here.
wholmgren commentedon Jan 21, 2019
Thanks @markcampanelli for raising the issue with numpy and bringing it to my attention here. I'm less convinced that we should put much effort into it within pvlib.