On Sun, Sep 18, 2011 at 4:02 PM, Eric Firing <efir...@hawaii.edu> wrote:
> There is a way to deal with this now: define our own copyto which uses
> np.copyto if it exists, and falls back on putnav otherwise.  I think this
> can be done with reasonable safety and no loss of performance.  The only
> question is where to put our copyto.  I think a new compat.py would make
> sense as a home for this sort of version compatibility interface code.  We
> may need a lot more in the future as numpy evolves.

We used to put these in cbook I believe; eg functions that existed in
python2.3 that we wanted to use but weren't defined in python2.2 which
we supported.  We could prefix them with a leading underscore to steer
users away from them

def _copyto(...):
   # temporary function to use numpy's copyto if it is defined, else
putmask; this function will be deprecated when we support only numpy
2.0 and later
   ...

I'd be in favor of doing this, because deprecations warnings are a nuisance.

JDH

------------------------------------------------------------------------------
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