Skip to content

Commit

Permalink
Pyright fixes for plot.py
Browse files Browse the repository at this point in the history
  • Loading branch information
michaeldeistler committed Dec 4, 2023
1 parent 8d1f0d0 commit d25a46b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sbi/analysis/plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -954,7 +954,7 @@ def _get_default_opts():
"samples_colors": plt.rcParams["axes.prop_cycle"].by_key()["color"][0::2],
"points_colors": plt.rcParams["axes.prop_cycle"].by_key()["color"][1::2],
# ticks
"tickformatter": mpl.ticker.FormatStrFormatter("%g"),
"tickformatter": mpl.ticker.FormatStrFormatter("%g"), # type: ignore
"tick_labels": None,
# options for hist
"hist_diag": {
Expand Down Expand Up @@ -1068,7 +1068,7 @@ def _sbc_rank_plot(
show_ylabel: bool = False,
sharey: bool = False,
fig: Optional[Figure] = None,
ax: Optional[Axes] = None,
ax=None, # no type hint to avoid hassle with pyright. Should be `array(Axes).`
figsize: Optional[tuple] = None,
) -> Tuple[Figure, Axes]:
"""Plot simulation-based calibration ranks as empirical CDFs or histograms.
Expand Down

0 comments on commit d25a46b

Please sign in to comment.