Most excellent solutions, thanks!
___
Numpy-discussion mailing list
Numpy-discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion
Ian Mallett wrote:
n = #blah
testlist = []
for x in xrange(n):
for y in xrange(n):
testlist.append([x,y])
testlist.append([x+1,y])
If testlist is an array (i.e., I could go: array(testlist)), it
works nicely. However, my Python method is certainly improveable
On 06/16/2009 02:18 PM, Robert wrote:
n = 10
xx = np.ones(n)
yy = np.arange(n)
aa = np.column_stack((xx,yy))
bb = np.column_stack((xx+1,yy))
aa
array([[ 1., 0.],
[ 1., 1.],
[ 1., 2.],
[ 1., 3.],
[ 1., 4.],
[ 1.,
Neil Martinsen-Burrell wrote:
On 06/16/2009 02:18 PM, Robert wrote:
n = 10
xx = np.ones(n)
yy = np.arange(n)
aa = np.column_stack((xx,yy))
bb = np.column_stack((xx+1,yy))
aa
array([[ 1., 0.],
[ 1., 1.],
[ 1., 2.],
[ 1., 3.],
On 2009-06-16 16:05 , Robert wrote:
Neil Martinsen-Burrell wrote:
On 06/16/2009 02:18 PM, Robert wrote:
n = 10
xx = np.ones(n)
yy = np.arange(n)
aa = np.column_stack((xx,yy))
bb = np.column_stack((xx+1,yy))
aa
array([[ 1., 0.],
[ 1., 1.],
I'm not sure it's worth having a function to replace a one-liner
(column_stack followed by reshape). But if you're going to implement
this with slice assignment, you should take advantage of the
flexibility this method allows and offer the possibility of
interleaving raggedly, that is, where the
Hi,
So I'm trying to get a certain sort of 3D terrain working in PyOpenGL. The
idea is to get vertex buffer objects to draw a simple 2D plane comprised of
many flat polygons, and use a vertex shader to deform that with a heightmap
and map that on a sphere.
I've managed to do this with a grid