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

Commit05e8501

Browse files
Update lib/matplotlib/cbook/__init__.py
Co-authored-by: Greg Lucas <greg.m.lucas@gmail.com>
1 parentf17f3af commit05e8501

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

‎lib/matplotlib/cbook/__init__.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2233,7 +2233,8 @@ def _unpack_to_numpy(x):
22332233
ifhasattr(x,'to_numpy'):
22342234
# Assume that any function to_numpy() do actually return a numpy array
22352235
returnx.to_numpy()
2236-
ifhasattr(x,'values'):
2236+
ifisinstance(getattr(x,'values',None),np.ndarray):
2237+
returnx.values
22372238
xtmp=x.values
22382239
# For example a dict has a 'values' attribute, but it is not a property
22392240
# so in this case we do not want to return a function

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp