Skip to content

Conversation

@MarcoGorelli
Copy link
Member

@MarcoGorelli MarcoGorelli commented Nov 6, 2025

The current return type that's documented is too broad, I think. It looks to me like it's always a 2D ndarray of Axes

Indeed, make_subplots is called with squeeze=False

fig, axes = create_subplots(
naxes=naxes,
ax=ax,
squeeze=False,

and in there there's:

else:
# returned axis array will be always 2-d, even if nrows=ncols=1
axes = axarr.reshape(nrows, ncols)

  • closes #xxxx (Replace xxxx with the GitHub issue number)
  • Tests added and passed if fixing a bug or adding a new feature
  • All code checks passed.
  • Added type annotations to new arguments/methods/functions.
  • Added an entry in the latest doc/source/whatsnew/vX.X.X.rst file if fixing a bug or adding a new feature.

@mroeschke mroeschke added this to the 3.0 milestone Nov 6, 2025
@mroeschke mroeschke merged commit ebbd16c into pandas-dev:main Nov 6, 2025
50 of 52 checks passed
@mroeschke
Copy link
Member

Thanks @MarcoGorelli

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants