File tree Expand file tree Collapse file tree 2 files changed +4
-0
lines changed
docs/sphinx/source/whatsnew Expand file tree Collapse file tree 2 files changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -40,6 +40,7 @@ Enhancements
4040* Created :py:func: `pvlib.iotools.read_midc ` and :py:func: `pvlib.iotools.read_midc_raw_data_from_nrel `
4141 to read NREL MIDC data. (:issue: `601 `)
4242* Change :py:func: `pvlib.pvsystem.sapm_spectral_loss ` to avoid numpy warning.
43+ * Add warning message when :py:func: `pvlib.spa ` is reloaded.
4344
4445
4546Bug fixes
Original file line number Diff line number Diff line change 2121
2222import numpy as np
2323import pandas as pd
24+ import warnings
2425
2526from pvlib import atmosphere
2627from pvlib .tools import datetime_to_djd , djd_to_datetime
@@ -242,12 +243,14 @@ def _spa_python_import(how):
242243 # reload the module without compiling
243244 # the PVLIB_USE_NUMBA env variable is used to tell the module
244245 # to not compile with numba
246+ warnings .warn ('Reloading spa to use numpy' )
245247 os .environ ['PVLIB_USE_NUMBA' ] = '0'
246248 spa = reload (spa )
247249 del os .environ ['PVLIB_USE_NUMBA' ]
248250 elif how == 'numba' and not using_numba :
249251 # The spa module was not compiled to numba code, so set
250252 # PVLIB_USE_NUMBA so it does compile to numba on reload.
253+ warnings .warn ('Reloading spa to use numba' )
251254 os .environ ['PVLIB_USE_NUMBA' ] = '1'
252255 spa = reload (spa )
253256 del os .environ ['PVLIB_USE_NUMBA' ]
You can’t perform that action at this time.
0 commit comments