Skip to content

Errors discovered in Example 6 #4

Description

@landky

Error 1

replacing key.split("_")[1] plot.py with key fixes it, but might not be the best solution.

---------------------------------------------------------------------------
IndexError                                Traceback (most recent call last)
Cell In[2], [line 27](vscode-notebook-cell:?execution_count=2&line=27)
     [23](vscode-notebook-cell:?execution_count=2&line=23) vars_ = ["Hs", "Tp", "DirM"]
     [26](vscode-notebook-cell:?execution_count=2&line=26) varp = ["Hs", "Tp"]
---> [27](vscode-notebook-cell:?execution_count=2&line=27) plots.bivariate_ensemble_pdf(df_sim, df_obs, varp)
     [29](vscode-notebook-cell:?execution_count=2&line=29) varp = ["Hs", "DirM"]
     [30](vscode-notebook-cell:?execution_count=2&line=30) plots.bivariate_ensemble_pdf(df_sim, df_obs, varp)

File C:\checkouts\branches\python\klandon\In-progress\marinetools-main\src\marinetools\graphics\plots.py:827, in bivariate_ensemble_pdf(df_sim, df_obs, varp, file_name)
    [825](file:///C:/checkouts/branches/python/klandon/In-progress/marinetools-main/src/marinetools/graphics/plots.py:825) CS = ax[row, column].contour(x, y, H, levels=levels)
    [826](file:///C:/checkouts/branches/python/klandon/In-progress/marinetools-main/src/marinetools/graphics/plots.py:826) ax[row, column].clabel(CS, inline=1, fontsize=10)
--> [827](file:///C:/checkouts/branches/python/klandon/In-progress/marinetools-main/src/marinetools/graphics/plots.py:827) ax[row, column].set_title(key.split("_")[1])
    [828](file:///C:/checkouts/branches/python/klandon/In-progress/marinetools-main/src/marinetools/graphics/plots.py:828) ax[row, column].grid(True)
    [829](file:///C:/checkouts/branches/python/klandon/In-progress/marinetools-main/src/marinetools/graphics/plots.py:829) if column == 0:

IndexError: list index out of range

Error 2

Error in the last line of example 6. Removing "fname=None" resolves it.

---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
Cell In[5], [line 18](vscode-notebook-cell:?execution_count=5&line=18)
     [11](vscode-notebook-cell:?execution_count=5&line=11)             lags[var_][ind_, :], c_[var_][ind_, :] = auxiliar.acorr(
     [12](vscode-notebook-cell:?execution_count=5&line=12)                 df_obs[j][var_].values, maxlags=maxlags
     [13](vscode-notebook-cell:?execution_count=5&line=13)             )
     [15](vscode-notebook-cell:?execution_count=5&line=15)         lagsim[var_], csim_[var_] = auxiliar.acorr(df_sim[var_].values, maxlags=maxlags)
---> [18](vscode-notebook-cell:?execution_count=5&line=18) plots.ensemble_acorr(lags, lagsim, c_, csim_, vars_, ax=None, fname=None)

TypeError: ensemble_acorr() got an unexpected keyword argument 'fname'

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions