Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Added elif for taking NumPy Array for imsave#29641

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
QuantumRaC wants to merge1 commit intomatplotlib:main
base:main
Choose a base branch
Loading
fromQuantumRaC:main
Open
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletionlib/matplotlib/image.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -1586,9 +1586,11 @@
# because that's what backend_agg passes, and can be in fact used
# as is, saving a few operations.
rgba = arr
elif arr.ndim == 3 and arr.shape[-1] in (3,4):

Check failure on line 1589 in lib/matplotlib/image.py

View workflow job for this annotation

GitHub Actions/ flake8

[flake8] reported by reviewdog 🐶E231 missing whitespace after ','Raw Output:./lib/matplotlib/image.py:1589:51: E231 missing whitespace after ','
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Does this work forshape[-1] == 3? AFAICS, rgba should have the alpha component included eventually?

rgba = arr

Check failure on line 1590 in lib/matplotlib/image.py

View workflow job for this annotation

GitHub Actions/ flake8

[flake8] reported by reviewdog 🐶E117 over-indentedRaw Output:./lib/matplotlib/image.py:1590:17: E117 over-indented
else:
sm = mcolorizer.Colorizer(cmap=cmap)
sm.set_clim(vmin, vmax)
sm.set_clim(vim, vmax)

Check failure on line 1593 in lib/matplotlib/image.py

View workflow job for this annotation

GitHub Actions/ flake8

[flake8] reported by reviewdog 🐶F405 'vim' may be undefined, or defined from star imports: matplotlib._imageRaw Output:./lib/matplotlib/image.py:1593:25: F405 'vim' may be undefined, or defined from star imports: matplotlib._image
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Looks like an unintended edit

rgba = sm.to_rgba(arr, bytes=True)
if pil_kwargs is None:
pil_kwargs = {}
Expand Down
Loading

[8]ページ先頭

©2009-2025 Movatter.jp