2009/2/10 Stéfan van der Walt <[email protected]>:
> x = np.arange(dim)
> y = np.arange(dim)[:, None]
> z = np.arange(dim)[:, None, None]

Do not operate heavy machinery or attempt broadcasting while tired or
under the influence.  That order was incorrect:

> z = np.arange(dim)
> y = np.arange(dim)[:, None]
> x = np.arange(dim)[:, None, None]

Cheers
Stéfan
_______________________________________________
Numpy-discussion mailing list
[email protected]
http://projects.scipy.org/mailman/listinfo/numpy-discussion

Reply via email to