On Sun, Sep 18, 2011 at 1:44 PM, Fernando Perez <fperez....@gmail.com> wrote:
> I'm not sure why, but as of a few weeks ago, with recent builds of
> numpy/mpl I always get these warnings:
>
> In [1]: imshow(rand(10,10))
> Out[1]: <matplotlib.image.AxesImage at 0x278f390>
>
> In [2]: 
> /home/fperez/usr/opt/lib/python2.6/site-packages/matplotlib/colors.py:519:
> DeprecationWarning: putmask has been deprecated. Use copyto with
> 'where' as the mask instead
>  np.putmask(xa, xa==1.0, 0.9999999) #Treat 1.0 as slightly less than 1.
> /home/fperez/usr/opt/lib/python2.6/site-packages/matplotlib/colors.py:531:
> DeprecationWarning: putmask has been deprecated. Use copyto with
> 'where' as the mask instead
>  np.putmask(xa, xa<0.0, -1)
> /home/fperez/usr/opt/lib/python2.6/site-packages/matplotlib/colors.py:535:
> DeprecationWarning: putmask has been deprecated. Use copyto with
> 'where' as the mask instead
>  np.putmask(xa, xa>self.N-1, self._i_over)
> /home/fperez/usr/opt/lib/python2.6/site-packages/matplotlib/colors.py:536:
> DeprecationWarning: putmask has been deprecated. Use copyto with
> 'where' as the mask instead
>  np.putmask(xa, xa<0, self._i_under)
>
>
> It would be nice to have these gone from master before release.

I can fix these putmask calls, but strangely I am not seeing the
deprecation warning on numpy and mpl HEAD

  In [1]: print np.__version__
  2.0.0.dev-aded70c

  In [2]: print matplotlib.__version__
  1.1.0

  In [3]: imshow(rand(10,10))
  Out[3]: <matplotlib.image.AxesImage at 0x48ff8d0>


If I do a simple putmask test I also don't get the warning

  In [4]: x = np.random.rand(10)

  In [5]: np.putmask(x, x<0.5, 0)

Do you have some custom warning or error settings turned on/  What
commit of np are you on?

I like how they have the commit hash in the version number; we need that.

------------------------------------------------------------------------------
BlackBerry&reg; DevCon Americas, Oct. 18-20, San Francisco, CA
http://p.sf.net/sfu/rim-devcon-copy2
_______________________________________________
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel

Reply via email to