SourceForge logo
SourceForge logo
Menu

[matplotlib-devel] question about imshow's support for masked arrays

From: Darren D. <dsd...@gm...> - 2009年03月25日 16:29:25
I am experimenting with numpy masked arrays, and have a question about how
imshow handles them:
from numpy import ma
from pylab import colorbar, imshow, show
a=ma.array([[1,2,3],[4,5,6]],mask=[[0,0,1],[0,0,0]], fill_value=0)
imshow(a, interpolation='nearest')
colorbar()
show()
With svn matplotlib, the missing value is treated as if identical to the
maximum value. I thought imshow would instead respect the masked array's
fill_value property by calling fix_invalid, and perhaps defaulting to the
min() or max() if fill_value is the default 999999. What is the intended
behavior?
Relatedly, it looks like imshow and other functions like contour are badly
confused by NaNs, I thought they were supported?
Thanks,
Darren

View entire thread

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.
Thanks for helping keep SourceForge clean.
X





Briefly describe the problem (required):
Upload screenshot of ad (required):
Select a file, or drag & drop file here.
Screenshot instructions:

Click URL instructions:
Right-click on the ad, choose "Copy Link", then paste here →
(This may not be possible with some types of ads)

More information about our ad policies

Ad destination/click URL:

AltStyle によって変換されたページ (->オリジナル) /