Re: [Numpy-discussion] Optimizing a pure Python Workaround

2009-07-18 Thread Ian Mallett
Hi, Sorry, I've been away in Oregon... The result isn't quite the same. The arrays must be in the range [0,1], so I just have it divide x3 and y. I also have it add 1 to size[1], as I realized that was also necessary for that behavior: x = np.arange(size[0]) x2 = np.column_stack([x,x+1]).resha

Re: [Numpy-discussion] Optimizing a pure Python Workaround

2009-07-13 Thread Robert Kern
On Mon, Jul 13, 2009 at 18:11, Ian Mallett wrote: > Hello, > > I have some code that makes vertex buffer object terrain.  Because the setup > for this (a series of triangle strips) is a bit clunky, I just implemented > the tricky parts in Python. > > The code works, but it's slow.  How should I go

[Numpy-discussion] Optimizing a pure Python Workaround

2009-07-13 Thread Ian Mallett
Hello, I have some code that makes vertex buffer object terrain. Because the setup for this (a series of triangle strips) is a bit clunky, I just implemented the tricky parts in Python. The code works, but it's slow. How should I go about optimizing it? Thanks, Ian size = [#int_something,#in