![](https://secure.gravatar.com/avatar/2cb42e5058af97d955e18572177981cf.jpg?s=120&d=mm&r=g)
13 Apr
2006
13 Apr
'06
4:56 p.m.
Hi, how to resize a array in the c++ code with weave.inline() I try : from scipy import * from scipy import weave from scipy.weave import converters c = ones((3,6)) code = """ PyArray_Dims dims; dims.len = 2; dims.ptr = new int[2]; dims.ptr[0] = 4; dims.ptr[1] = 7; PyArray_Resize(&c,&dims); """ err = weave.inline(code, ['c'], type_converters=converters.blitz) print c.shape #I want (4,7) !!! but it does'nt work because c is not a PyArray_Object. Is there a easier (and working) way ? Thanks Samuel