On Sep 15, 2010, at 11:01 AM, Mark Bakker wrote:
> Hello List,
>
> Can I make a view of an entire array but with a different shape?
>
> For example:
>
> a = zeros((2,3,4))
Mark,
Try that.
b = a.reshape((2,12))
Now,
>>> b.flat=1
>>> a
array([[[ 1., 1., 1., 1.],
[ 1., 1., 1., 1.],
[ 1., 1., 1., 1.]],
[[ 1., 1., 1., 1.],
[ 1., 1., 1., 1.],
[ 1., 1., 1., 1.]]])
_______________________________________________
NumPy-Discussion mailing list
[email protected]
http://mail.scipy.org/mailman/listinfo/numpy-discussion