Tom Loredo wrote: > Hi folks, > > It is turning out to be much more of a headache moving from > numpy-0.9.x to numpy-1.0b1 than it ever was moving from Numeric > to numpy. Could someone please throw together some release > notes (the scipy & sourceforge RN pages are blank) or a Wiki > page warning what has to be changed? Release Notes are forthcoming. But, probably won't be available for awhile.
The "problem" is that backward compatibility is not accomplished simply by using import numpy instead of import Numeric. You have to use import numpy.oldnumeric to get it. > * Type names are all now lower case. I know this started > happening late in 0.9.x, but I only know it by accident, via > some email from Travis. > Use numpy.oldnumeric where the upper-case typenames are all available. > * .nonzero() now returns a 1-tuple with an array of indices, > for a 1-d array. Before it returned an array of indices. > Use the nonzero function which has the same behavior as Numeric. > * In the C API, ContiguousFromObject is now ContiguousFromAny. > I am surprised that my libraries compile with no errors; I > only get a runtime error. Shouldn't I be warned about this > at compile-time? > I'm not sure what the problem you are getting is. Please give your runtime error. This should work. ContiguousFromObject is still available. > * mtrand still uses ContiguousFromObject in a few places; these > give exceptions when you call, e.g., setstate. > Please post the error, it's a bug. > * rand, fft, ift are no longer in the numpy namespace. Is > this a permanent change or a bug? > Yep, permanent change after long discussion. Get them from numpy.random and numpy.dft respectively. I agree that moving from numpy <1.0 to numpy 1.0 is a little painful because of name-space issues. That's why numpy was labeled pre 1.0. I was assuming adopters were willing to move with us until NumPy 1.0 where backward compatibility would be made an important issue. These issues could not have been sorted out without the users who adopted it early. Name-space issues are the biggest ones. Rather than put all backward compatibility in the bloated numpy namespace we moved some of it. This will be discussed in the Release Notes, but honestly Release Notes take me the longest time to put together and I just haven't had the time. The early adopters deserve a lot of praise because it is harder (you have to manually alter some import statements and watch your usage of .nonzero) to move from numpy 0.9.2 to numpy 1.0 than it is to move from Numeric to NumPy. It was felt that it is better to bite the bullet this one time than to have regrets once NumPy 1.0 is out and backward compatibility is paramount. -Travis ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Numpy-discussion mailing list Numpy-discussion@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/numpy-discussion