contributing C/Cython code to the scikit

mael mael.primet at gmail.com
Tue Sep 21 05:10:24 EDT 2010


Thanks for the input Stéfan,

I will try to gradually improve my python code style, have you
specifics you have seen in my code that were out of the way?

I removed opencv on my laptop because this wouldn't build (I'll try to
figure out why)

for the data types, the discussion is very interesting,
most of the algorithms could be adapted for different data-types by
some preprocessor-like translation,
however, this might create some problems (floating point comparison
etc). Plus, our feeling with the previous
library we were using (Megawave) was that it was better not to provide
an algorithm for each and every possible datatype,
as it forced the end-user to ponder whether the algorithm he was
trying to use was suited to his case etc.
But I concur that writing float (possibly float and doubles) and
integer (int and unsigned char?) arrays should be
 made as easy as possible.

I'm in the process of writing docstrings and some unit testing

I'll come back to you once I'll have played a bit with the library,

hope we'll gain some momentum by adding a few interesting algorithms
and get people to use the library as the Python standard

btw we're also interested in coding some powerful visualization
function. I guess we'd rather not clutter the scikit with dependencies
to pyQt or other libraries.
How would you go about doing something like this? Use some library
like chaco? Write from scratch a PyQt viewer?

I'm not really that good a coder, so I'd be happy to have you guys
refactor some of my code and tell me the best way to go about it,
particularly to avoid
copying arrays over and over. We want to have simple contiguous arrays
though, because we don't want to bother with complex array iteration
in our C code.
Is the way I'm doing it (that was given to us by Emmanuelle) the
proper way of getting our arrays as contiguous C arrays or are there
some more efficient
and/or  elegant way to do this?





More information about the scikit-image mailing list