Skip to content

Commit

Permalink
adjustment to make python 3.11 happy
Browse files Browse the repository at this point in the history
the error exposed in a Jupyter notebook was:

```
    43 da = xr.DataArray.transpose(ds.psd)
     45 # get solar elevation
     46 # Estimate the solar position with a specific SPA defined with the argument 'method'
---> 47 solpos = pvlib.solarposition.get_solarposition(ds.time, *lat_lon_for_solpos)
     48 se = solpos.elevation  # isolate solar elevation
     49 # map elevation to gray scale

TypeError: Value after * must be an iterable, not float
```
  • Loading branch information
carueda committed Jan 24, 2024
1 parent f886e04 commit 1990ffb
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/plotting.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@ def plot_dataset_summary(

# get solar elevation
# Estimate the solar position with a specific SPA defined with the argument 'method'
solpos = pvlib.solarposition.get_solarposition(ds.time, *lat_lon_for_solpos)
latitude, longitude = lat_lon_for_solpos
solpos = pvlib.solarposition.get_solarposition(ds.time, latitude=latitude, longitude=longitude)
se = solpos.elevation # isolate solar elevation
# map elevation to gray scale
seg = 0 * se # 0 covers nighttime (black)
Expand Down

0 comments on commit 1990ffb

Please sign in to comment.