2009/2/10 Robert Kern <[email protected]>: > x = np.arange(dim)[:,np.newaxis,np.newaxis] > y = np.arange(dim)[np.newaxis,:,np.newaxis] > z = np.arange(dim)[np.newaxis,np.newaxis,:]
Yes, sorry, I should have copied from my terminal. I think I had x = np.arange(dim) y = np.arange(dim)[:, None] z = np.arange(dim)[:, None, None] which broadcasts the same way. Cheers Stéfan _______________________________________________ Numpy-discussion mailing list [email protected] http://projects.scipy.org/mailman/listinfo/numpy-discussion
