Skip to content

Commit

Permalink
plotting 2d arrays: n_rows from float to int because float not (proba…
Browse files Browse the repository at this point in the history
…bly no longer?) accepted by plt.subplot in matplotlib 3.8.4 (#783)
  • Loading branch information
thehrh authored Jul 28, 2024
1 parent 1f28fb3 commit 6ad2b2b
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions pisa/utils/plotter.py
Original file line number Diff line number Diff line change
Expand Up @@ -299,8 +299,7 @@ def plot_array(self, map_set, fun, *args, **kwargs):
raise TypeError('Expecting to plot a MapSet but '
'got %s'%type(map_set))
if n_rows is None and n_cols is None:
# TODO: auto row/cols
n_rows = np.floor(np.sqrt(n))
n_rows = int(np.floor(np.sqrt(n)))
while n % n_rows != 0:
n_rows -= 1
n_cols = n // n_rows
Expand Down

0 comments on commit 6ad2b2b

Please sign in to comment.