-
Notifications
You must be signed in to change notification settings - Fork 1.1k
fix incorrect nan assignments in singleaxis, allow scalar and 1d array input #573
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
Conversation
pvlib/test/test_tracking.py
Outdated
| expect = pd.DataFrame({'tracker_theta': 0, 'aoi': 10, | ||
| 'surface_azimuth': 90, 'surface_tilt': 0}, | ||
| index=[0], dtype=np.float64) | ||
| index=index, dtype=np.float64) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
E127 continuation line over-indented for visual indent
pvlib/test/test_tracking.py
Outdated
| apparent_azimuth = np.array([[180, 180], [180, 180]]) | ||
| with pytest.raises(ValueError): | ||
| tracker_data = tracking.singleaxis(apparent_zenith, apparent_azimuth, | ||
| axis_tilt=0, axis_azimuth=0, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
E128 continuation line under-indented for visual indent
pvlib/test/test_tracking.py
Outdated
| with pytest.raises(ValueError): | ||
| tracker_data = tracking.singleaxis(apparent_zenith, apparent_azimuth, | ||
| axis_tilt=0, axis_azimuth=0, | ||
| max_angle=90, backtrack=True, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
E128 continuation line under-indented for visual indent
pvlib/test/test_tracking.py
Outdated
| tracker_data = tracking.singleaxis(apparent_zenith, apparent_azimuth, | ||
| axis_tilt=0, axis_azimuth=0, | ||
| max_angle=90, backtrack=True, | ||
| gcr=2.0/7.0) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
E128 continuation line under-indented for visual indent
pvlib/tracking.py
Outdated
| # filter for sun above panel horizon | ||
| wid[zp <= 0] = np.nan | ||
| zen_gt_90 = apparent_zenith > 90 | ||
| wid[apparent_zenith > 90] = np.nan |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
did you mean wid[zen_gt_90] = np.nan?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, thanks
docs/sphinx/source/api.rstfor API changes.docs/sphinx/source/whatsnewfile for all changes.I punted on the question of nan/0.
Would also be nice to remove the requirement that input data be series. Yuck.Now accepts scalar/1d input