Hi,<br>
I found SIWG extremely to use but it only exposes a function to Python
but not to numpy. Thus it is very slow for matrix functions. So if you
want speed then you will have to deal with the APIs.<br>
<br>
Regards<br>
Bruce<br><br><div><span class="gmail_quote">On 11/3/05, <b class="gmail_sendername">Chris Barker</b> <<a href="mailto:Chris.Barker@noaa.gov">Chris.Barker@noaa.gov</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi all,<br><br>I suddenly seem to have the need for working with a bunch of different<br>existing C and C++ code, so I'm looking for a way to make it easier. I<br>love NumPy, so I really want to use NumPy arrays  My needs fall into
<br>three categories:<br><br>1) Writing custom extension code from scratch:<br><br>In the past, I've done this by just using the NumPy API, but it seems<br>that I shouldn't have to do all that book keeping myself.<br><br>
2) Wrapping existing libraries:<br><br>At the moment, I'd like to wrap Richard Shewchuk's triangle:<br><br><a href="http://www.cs.cmu.edu/~quake/triangle.html">http://www.cs.cmu.edu/~quake/triangle.html</a><br><br>Which is straight C, as well as the Proj4 map projections library, also
<br>C, and there may be others.<br><br>3) Wrapping in house code, C & C++, that is under development, but I<br>want to be able to use it from Python and C++, and also perhaps to write<br>tests for it in Python.<br><br>
The options I'm looking at are:<br><br>Pyrex:<br><br>This seems like perhaps the easiest way to write extension code, but it<br>doesn't do any automatic wrapping.<br><br>Boost::Python:<br><br>This looks like a very nice way to write extension modules, and it even
<br>appears to already include support for NumPy arrays (which ones? is that<br>support being maintained, and will it support SciPy.base?)<br><br>SWIG:<br><br>The has the major advantage of automatically wrapping code. I see this
<br>as a particular strength for wrapping our in house code that is under<br>development. In theory, once I've written a bunch of type maps, i can<br>just re-run it whenever the code base changes.<br><br><br>For each of these, I'd love to hear what people's experiences have been,
<br>and it would be great if anyone can point me to samples that are small<br>but non-trivial. Other options I should consider would be great too.<br><br><br>One more question: Should I use NumPy arrays to pass data back and forth
<br>between Python and C, or should I use the new array object/protocol<br>instead? If so, has anyone developed examples, SWIG type maps, etc for this?<br><br>Thanks for any feedback,<br><br>-Chris<br><br><br><br><br><br>
<br><br>--<br>Christopher Barker, Ph.D.<br>Oceanographer<br><br>NOAA/OR&R/HAZMAT         (206) 526-6959   voice<br>7600 Sand Point Way NE   (206) 526-6329   fax<br>Seattle, WA  98115       (206) 526-6317   main reception
<br><br><a href="mailto:Chris.Barker@noaa.gov">Chris.Barker@noaa.gov</a><br><br><br>-------------------------------------------------------<br>SF.Net email is sponsored by:<br>Tame your development challenges with Apache's Geronimo App Server. Download
<br>it for free - -and be entered to win a 42" plasma tv or your very own<br>Sony(tm)PSP.  Click here to play: <a href="http://sourceforge.net/geronimo.php">http://sourceforge.net/geronimo.php</a><br>_______________________________________________
<br>Numpy-discussion mailing list<br><a href="mailto:Numpy-discussion@lists.sourceforge.net">Numpy-discussion@lists.sourceforge.net</a><br><a href="https://lists.sourceforge.net/lists/listinfo/numpy-discussion">https://lists.sourceforge.net/lists/listinfo/numpy-discussion
</a><br></blockquote></div><br>