dmitrey wrote: > hi all. > in the numpy for matlab users I read > > y = x.flatten(1) > > turn array into vector (note that this forces a copy) > > Is there any way to do the trick wthout copying? > What are the problems here? Just other way of array elements indexing...
One important question is whether you actually need the new vector, or whether you just want a flat index into the array; if the latter, you can always [I think] use x.flat[one_d_index]. (But note that y=x.flat gives an iterator, not a new array.) Andrew _______________________________________________ Numpy-discussion mailing list [email protected] http://projects.scipy.org/mailman/listinfo/numpy-discussion
