File tree 2 files changed +4
-0
lines changed
docs/sphinx/source/whatsnew
2 files changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -40,6 +40,7 @@ Enhancements
40
40
* Created :py:func: `pvlib.iotools.read_midc ` and :py:func: `pvlib.iotools.read_midc_raw_data_from_nrel `
41
41
to read NREL MIDC data. (:issue: `601 `)
42
42
* Change :py:func: `pvlib.pvsystem.sapm_spectral_loss ` to avoid numpy warning.
43
+ * Add warning message when :py:func: `pvlib.spa ` is reloaded.
43
44
44
45
45
46
Bug fixes
Original file line number Diff line number Diff line change 21
21
22
22
import numpy as np
23
23
import pandas as pd
24
+ import warnings
24
25
25
26
from pvlib import atmosphere
26
27
from pvlib .tools import datetime_to_djd , djd_to_datetime
@@ -242,12 +243,14 @@ def _spa_python_import(how):
242
243
# reload the module without compiling
243
244
# the PVLIB_USE_NUMBA env variable is used to tell the module
244
245
# to not compile with numba
246
+ warnings .warn ('Reloading spa to use numpy' )
245
247
os .environ ['PVLIB_USE_NUMBA' ] = '0'
246
248
spa = reload (spa )
247
249
del os .environ ['PVLIB_USE_NUMBA' ]
248
250
elif how == 'numba' and not using_numba :
249
251
# The spa module was not compiled to numba code, so set
250
252
# PVLIB_USE_NUMBA so it does compile to numba on reload.
253
+ warnings .warn ('Reloading spa to use numba' )
251
254
os .environ ['PVLIB_USE_NUMBA' ] = '1'
252
255
spa = reload (spa )
253
256
del os .environ ['PVLIB_USE_NUMBA' ]
You can’t perform that action at this time.
0 commit comments