switching to numpy and failing, a user story

greg.landrum at gmail.com greg.landrum at gmail.com
Wed Oct 4 01:44:30 EDT 2006


After using numeric for almost ten years, I decided to attempt to
switch a large codebase (python and C++) to using numpy. Here's are
some comments about how that went.

- The code to automatically switch python stuff over just kind of
works. But it was a 90% solution, I could do the rest by hand. Of
course, the problem is that then the code is still using the old
numeric API, so it's not a long term solution. Unfortunately, to switch
to the numpy API one needs documentation, which is a problem; see
below.

- Well, ok, the automatic switching code doesn't really work all that
well... my uses of RandomArray still work, but they generate different
numbers. The underlying random-number generator must have changed. I'm
sure that it's "better" now, but it's different. This is a major pain
for my regression tests that rely on seeding the random number
generator and getting particular results. But that's ok, I can update
the regressions for the new RNG.

- My extension modules just won't build because the new numpy stuff
lives in a different location from where Numeric used to live. I
probably could fix this, but without the documentation I can't figure
out how to do that. I'd also need to figure out how to port my code to
use the new numpy API instead of the compatibility layer, but I can't
do that without docs either.

- I guess I should just buy the documentation. I don't like this idea,
because I think it's counter-productive to the project to have payware
docs (would Python be successful if you had to buy the documentation? I
don't think so), but that's the way this project goes. I'm doubly
unhappy about it because they payment system is using Paypal and I
don't like Paypal at all, but I guess that's just the way it goes. Oh,
wait, I *can't* buy the docs because I'm not in the US and the payment
page requires a US address. I give up; I guess NumPy is only for people
living in the US.

I guess I'll come back to NumPy in 2010, when the docs are available.

-greg




More information about the Python-list mailing list