[Numpy-discussion] Change to get_printoptions?

Zachary Pincus zpincus@stanford....
Wed Jul 25 14:54:48 CDT 2007


Hello all,

I just recently updated to the SVN version of numpy to test my code  
against it, and found that a small change made to  
numpy.get_printoptions (it now returns a dictionary instead of a  
list) breaks my code.

Here's the changeset:
http://projects.scipy.org/scipy/numpy/changeset/3877

I'm not really looking forward to needing to detect numpy versions  
just so I can do the right thing with get_printoptions, but I do  
agree that the new version of the function is more sensible. My  
question is if there's any particular policy about backwards- 
incompatible python api changes, or if I need to be aware of their  
possibility at every point release. (Either is fine -- I'm happy for  
numpy to be better at the cost of incompatibility, but I'd like to  
know if changes like these are the rule or exception.)

Also, in terms of compatibility checking, has anyone written a little  
function to check if numpy is within a particular version range?  
Specifically, one that handles numpy's built from SVN as well as from  
release tarballs.


Thanks,

Zach Pincus

Program in Biomedical Informatics and Department of Biochemistry
Stanford University School of Medicine



More information about the Numpy-discussion mailing list