Re: [Numpy-discussion] Extending an ndarray

2008-05-14 Thread Søren Nielsen
=zeros((10,10)) b[:5,:5]=a On Wed, May 14, 2008 at 2:48 PM, Søren Nielsen [EMAIL PROTECTED] wrote: Hi, I've loaded an image into a ndarray. I'd like to extend the ndarray with a border of zeros all around the ndarray.. does anyone here know how to do this? Thanks, Soren

[Numpy-discussion] indexing numpy arrays in extensions created with ext_tools

2008-10-31 Thread Søren Nielsen
Hi, I'm trying to make a weave python extension to use in my program. I already did it in inline, but that doesn't work with py2exe (needs compiler), so I'm creating extensions instead using ext_tools. Is there a way I can use blitz with ext_tools? so that I can refer to numpy arrays like a(x,y)

Re: [Numpy-discussion] ANN: I wrote some Numpy + SWIG + MinGW simple examples

2008-11-14 Thread Søren Nielsen
Hi Egor, Thanks for a very nice tutorial! Have you tried doing manipulations with 2D arrays?? or do you know how to tackle it? Regards, Soren On Fri, Nov 14, 2008 at 12:32 AM, Egor Zindy [EMAIL PROTECTED] wrote: Hello list! To get my head round the numpy.i interface for SWIG, I wrote some

[Numpy-discussion] Weave Ext_tools converters not working??

2008-11-17 Thread Søren Nielsen
Can anyone explain why this fails? This piece of code runs perfectly using weave.inline and type_converters = blitz.. Obviously it can't handle 2D arrays anymore. It's just a stupid example to illustrate that. Thanks, Soren CODE :

Re: [Numpy-discussion] Weave Ext_tools converters not working??

2008-11-17 Thread Søren Nielsen
because it's written as C code using the blitz type converter.. I found the answer to my own problem. I added type_converters = converters.blitz in the ext_functions function call. On Mon, Nov 17, 2008 at 7:09 PM, Nadav Horesh [EMAIL PROTECTED]wrote: On Mon, 2008-11-17 at 15:42 +0100, Søren