Skip to content

Commit

Permalink
resolved merge conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
eccoope committed Jun 25, 2024
2 parents 8f382d5 + c144f6e commit 8d7de2e
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
1 change: 1 addition & 0 deletions docs/whatsnew/0.2.1.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ Breaking Changes

Enhancements
~~~~~~~~~~~~
* Compatibility with numpy 2.0. (:pull:`211`)
* Added functions :py:func:`~pvanalytics.features.snow.categorize`
and :py:func:`~pvanalytics.features.snow.get_transmission` to categorize
data by the effect of snow on DC voltage and current. (:pull:`209`)
Expand Down
10 changes: 5 additions & 5 deletions pvanalytics/quality/irradiance.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,20 +19,20 @@
'ghi_ratio': {
'low_zenith': {
'zenith_bounds': [0.0, 75],
'ghi_bounds': [50, np.Inf],
'ghi_bounds': [50, np.inf],
'ratio_bounds': [0.92, 1.08]},
'high_zenith': {
'zenith_bounds': [75, 93],
'ghi_bounds': [50, np.Inf],
'ghi_bounds': [50, np.inf],
'ratio_bounds': [0.85, 1.15]}},
'dhi_ratio': {
'low_zenith': {
'zenith_bounds': [0.0, 75],
'ghi_bounds': [50, np.Inf],
'ghi_bounds': [50, np.inf],
'ratio_bounds': [0.0, 1.05]},
'high_zenith': {
'zenith_bounds': [75, 93],
'ghi_bounds': [50, np.Inf],
'ghi_bounds': [50, np.inf],
'ratio_bounds': [0.0, 1.10]}}}


Expand Down Expand Up @@ -392,7 +392,7 @@ def clearsky_limits(measured, clearsky, csi_max=1.1):
csi = pvlib.irradiance.clearsky_index(
measured,
clearsky,
max_clearsky_index=np.Inf
max_clearsky_index=np.inf
)
return quality.util.check_limits(
csi, upper_bound=csi_max, inclusive_upper=True
Expand Down
6 changes: 3 additions & 3 deletions pvanalytics/tests/quality/test_outliers.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,21 +45,21 @@ def test_tukey_lower_criteria():


def test_zscore_raise_nan_input():
data = pd.Series([1, 0, -1, 0, np.NaN, 1, -1, 10])
data = pd.Series([1, 0, -1, 0, np.nan, 1, -1, 10])

with pytest.raises(ValueError):
outliers.zscore(data, nan_policy='raise')


def test_zscore_invalid_nan_policy():
data = pd.Series([1, 0, -1, 0, np.NaN, 1, -1, 10])
data = pd.Series([1, 0, -1, 0, np.nan, 1, -1, 10])

with pytest.raises(ValueError):
outliers.zscore(data, nan_policy='incorrect_str')


def test_zscore_omit_nan_input():
data = pd.Series([1, 0, -1, 0, np.NaN, 1, -1, 10])
data = pd.Series([1, 0, -1, 0, np.nan, 1, -1, 10])
assert_series_equal(
pd.Series([False, False, False, False, False, False, False, True]),
outliers.zscore(outliers.zscore(data, nan_policy='omit'))
Expand Down

0 comments on commit 8d7de2e

Please sign in to comment.