From: Faheem M. <fa...@em...> - 2004-03-27 17:35:30
|
The README in numarray-0.9/Examples refers to the non-existent file setup.py (at least in that directory). There are other files called setup.py elsewhere in the tarball, but they don't look like they are supposed to compile the examples. What am I missing? Thanks, Faheem. ******************************************************************** This directories gives examples and benchmarks ot he usage of numarray. To install do ,---- | python setup.py install `---- in this directory. This will install all examples. You can test all of them by running ,---- | python testall.py `---- or go to the individual subdirectories and look at the examples more closely. ******************************************************************** |
From: Todd M. <jm...@st...> - 2004-03-27 21:49:24
|
On Sat, 2004-03-27 at 12:35, Faheem Mitha wrote: > The README in numarray-0.9/Examples refers to the non-existent file > setup.py (at least in that directory). There are other files called > setup.py elsewhere in the tarball, but they don't look like they are > supposed to compile the examples. > > What am I missing? Nothing. Those are dead comments in the README (they didn't survive the "numarray re-packaging"). There is now a single setup.py for all numarray packages in the root numarray directory. To install the examples, just install numarray. The examples are then found in the package numarray.examples.convolve. If you want to write your own extension, my advice is to stick with the numpy compatible interfaces. A close second is the numarray "high level" interface. Regards, Todd -- Todd Miller <jm...@st...> |
From: Faheem M. <fa...@em...> - 2004-03-28 15:54:46
|
On Sat, 27 Mar 2004, Todd Miller wrote: > On Sat, 2004-03-27 at 12:35, Faheem Mitha wrote: > > The README in numarray-0.9/Examples refers to the non-existent file > > setup.py (at least in that directory). There are other files called > > setup.py elsewhere in the tarball, but they don't look like they are > > supposed to compile the examples. > > > > What am I missing? > > Nothing. Those are dead comments in the README (they didn't survive the > "numarray re-packaging"). There is now a single setup.py for all > numarray packages in the root numarray directory. Ok. In that case changing the README would be a good idea in order to avoid confusion. > To install the examples, just install numarray. The examples are then > found in the package numarray.examples.convolve. Ok. I see the examples are in the Debian package python2.3-numarray-ext. > If you want to write your own extension, my advice is to stick with > the numpy compatible interfaces. A close second is the numarray > "high level" interface. I see. You mean use #include "arrayobject.h" right? BTW, the high level API example in convolve uses #include "libnumarray.h" even though the documentation refers to #include "numarray.h" Which of these should be used? Actually, it might be an idea to state explicitly in 12.3-12.6 which header files should be use. Possibly include them in the example code itself. I'm considering just using the Numeric C API on the assumption that is will be easier to use (since I am a beginner). Is this assumption accurate? Thanks for all the help. Faheem. |
From: Todd M. <jm...@st...> - 2004-03-28 22:14:48
|
On Sun, 2004-03-28 at 10:54, Faheem Mitha wrote: > On Sat, 27 Mar 2004, Todd Miller wrote: > > > On Sat, 2004-03-27 at 12:35, Faheem Mitha wrote: > > > The README in numarray-0.9/Examples refers to the non-existent file > > > setup.py (at least in that directory). There are other files called > > > setup.py elsewhere in the tarball, but they don't look like they are > > > supposed to compile the examples. > > > > > > What am I missing? > > > > Nothing. Those are dead comments in the README (they didn't survive the > > "numarray re-packaging"). There is now a single setup.py for all > > numarray packages in the root numarray directory. > > Ok. In that case changing the README would be a good idea in order to > avoid confusion. Sure. > > To install the examples, just install numarray. The examples are then > > found in the package numarray.examples.convolve. > > Ok. I see the examples are in the Debian package > python2.3-numarray-ext. I don't use debian anymore so I'm not sure what goes on there. I'm glad some of the debian guys are making numarray available. > > > If you want to write your own extension, my advice is to stick with > > the numpy compatible interfaces. A close second is the numarray > > "high level" interface. > > I see. You mean use > > #include "arrayobject.h" > > right? Exactly. Using the numpy compatible API also keeps you close to Numeric in case small array performance ever becomes an issue for you and you decide you want to switch back to Numeric. It might also let others who are using Numeric use your extensions even if you choose to use numarray yourself. > > BTW, the high level API example in convolve uses > > #include "libnumarray.h" > > even though the documentation refers to > > #include "numarray.h" > Thanks for the info. Obviously this evolved over time and the docs didn't. > Which of these should be used? When in doubt, go with what the example code is doing (in the source distribution), so libnumarray.h. If you see something questionable, ask. > Actually, it might be an idea to state > explicitly in 12.3-12.6 which header files should be use. Possibly > include them in the example code itself. There is working example code in the source distribution. At one point, the example code in the manual was working as well; that's where it came from. > > I'm considering just using the Numeric C API on the assumption that is > will be easier to use (since I am a beginner). Is this assumption > accurate? I think they're both fairly easy, but the Numeric API as the advantage of backward compatibility. > Thanks for all the help. Thanks for all the feedback. Regards, Todd > Faheem. > -- Todd Miller <jm...@st...> |
From: Craig R. <cra...@la...> - 2004-03-29 16:29:00
|
On Mar 27, 2004, at 2:49 PM, Todd Miller wrote: > To install the examples, just install numarray. The examples are then > found in the package numarray.examples.convolve. If you want to write > your own extension, my advice is to stick with the numpy compatible > interfaces. A close second is the numarray "high level" interface. Does numarray have the equivalent of PyArray_FromDimsAndData()? This function is critical for the work I'm doing on Co-Array Python (because it is essentially a distributed array module with Co-Array syntax, it must use memory allocated by C) and for using Fortran memory for Numeric or numarray arrays. Regards, Craig |
From: Todd M. <jm...@st...> - 2004-03-29 16:43:52
|
On Mon, 2004-03-29 at 11:25, Craig Rasmussen wrote: > On Mar 27, 2004, at 2:49 PM, Todd Miller wrote: > > > To install the examples, just install numarray. The examples are then > > found in the package numarray.examples.convolve. If you want to write > > your own extension, my advice is to stick with the numpy compatible > > interfaces. A close second is the numarray "high level" interface. > > Does numarray have the equivalent of PyArray_FromDimsAndData()? numarray's Numeric compatibility layer has that function. Because numarray uses buffer objects, numarray winds up making a copy of the data. This behavior could be changed but hasn't been yet. Regards, Todd -- Todd Miller <jm...@st...> |