From d1e153e70103517900dda1cc1b882f669d2c4d35 Mon Sep 17 00:00:00 2001 From: dgowdaan-cmyk Date: Sun, 28 Jun 2026 20:49:28 +0530 Subject: [PATCH 1/2] DOC: add Examples to iam.ashrae docstring --- pvlib/iam.py | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/pvlib/iam.py b/pvlib/iam.py index 161de84589..9807f65e4e 100644 --- a/pvlib/iam.py +++ b/pvlib/iam.py @@ -78,6 +78,16 @@ def ashrae(aoi, b=0.05): pvlib.iam.physical pvlib.iam.martin_ruiz pvlib.iam.interp + + Examples + -------- + >>> import pvlib + >>> pvlib.iam.ashrae(aoi=20) + 0.9967911113762044 + + >>> import numpy as np + >>> pvlib.iam.ashrae(aoi=np.array([0, 30, 50, 90])) + array([1. , 0.99226497, 0.97221381, 0. ]) """ iam = 1 - b * (1 / np.cos(np.radians(aoi)) - 1) @@ -686,7 +696,7 @@ def marion_integrate(function, surface_tilt, region, num=None): iam : numeric AOI diffuse correction factor for the specified region. - See Also + See Also -------- pvlib.iam.marion_diffuse @@ -705,7 +715,7 @@ def marion_integrate(function, surface_tilt, region, num=None): >>> from functools import partial >>> f = partial(pvlib.iam.physical, n=1.3) >>> marion_integrate(f, [20, 30], 'sky') - array([0.96225034, 0.9653219 ]) + >>> array([0.96225034, 0.9653219 ]) """ if num is None: From 8e1b87bc27a0d933ff4a721b9c50bce2636e1217 Mon Sep 17 00:00:00 2001 From: dgowdaan-cmyk Date: Sun, 28 Jun 2026 21:05:50 +0530 Subject: [PATCH 2/2] DOC: add whatsnew entry for iam.ashrae Examples --- docs/sphinx/source/whatsnew/v0.15.3.rst | 26 +++---------------------- 1 file changed, 3 insertions(+), 23 deletions(-) diff --git a/docs/sphinx/source/whatsnew/v0.15.3.rst b/docs/sphinx/source/whatsnew/v0.15.3.rst index 87ded069ee..b70db3c617 100644 --- a/docs/sphinx/source/whatsnew/v0.15.3.rst +++ b/docs/sphinx/source/whatsnew/v0.15.3.rst @@ -1,45 +1,25 @@ -.. _whatsnew_0_15_3: - - +.. _whatsnew_0_15_3: v0.15.3 (Anticipated September, 2026) ------------------------------------- - Breaking Changes ~~~~~~~~~~~~~~~~ - - Deprecations ~~~~~~~~~~~~ - - Bug fixes ~~~~~~~~~ - - Enhancements ~~~~~~~~~~~~ - - Documentation ~~~~~~~~~~~~~ - - +* Added ``Examples`` section to :py:func:`pvlib.iam.ashrae` docstring. :pull:`2797` (:ghuser:`dgowdaan-cmyk`) Testing ~~~~~~~ - - Benchmarking ~~~~~~~~~~~~ - - Requirements ~~~~~~~~~~~~ - - Maintenance ~~~~~~~~~~~ - - Contributors ~~~~~~~~~~~~ - +* :ghuser:`dgowdaan-cmyk`