Closed 1fish2 closed 5 years ago
Fixes #40
Thanks for reviewing all this. It was a good opportunity to discuss Cython. Happy to do more of that.
BTW, I started a wiki page on Cython. So far it just links to key web pages. Maybe some of the points here could go there.
Also BTW, the Cython docs got significantly better in the last release.
I'll experiment a bit more with setup.py
then merge this PR.
Yes, I did test in python 3.
obsidianmodule.c
in Cython asarrowhead.pyx
.test_arrow.py
measurements, it ran about 5% slower, but that's within measurement noise. Theobsidian.c
code is unchanged except the caller passes in a struct instead of 13 arguments (to save some packing and unpacking code) so the solver should run at the same speed.np.import_array()
rabbit hole if I'd only known. The fix is easy; knowing about it was not.setup.py
hell. Short answer: The current file seems to work reliably if you first delete the previous outputs.six
to support some Python 3 renames.time
shadowing moduleimport time
).TODO: Test building and installing pip packages into Python 2 and 3.