Skip to content

Commit f146e17

Browse files
committed
fix index stripping
1 parent 314af4a commit f146e17

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

pvlib/clearsky.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -411,8 +411,14 @@ def simplified_solis(apparent_elevation, aod700=0.1, precipitable_water=1.,
411411
irrads = np.array([dni, ghi, dhi])
412412

413413
if not return_raw:
414+
if isinstance(dni, pd.Series):
415+
index = dni.index
416+
else:
417+
index = None
418+
414419
try:
415-
irrads = pd.DataFrame(irrads.T, columns=['dni', 'ghi', 'dhi'])
420+
irrads = pd.DataFrame(irrads.T, columns=['dni', 'ghi', 'dhi'],
421+
index=index)
416422
except ValueError:
417423
# probably all scalar input, so we
418424
# need to increase the dimensionality

0 commit comments

Comments
 (0)