On Fri, May 9, 2008 at 1:41 PM, Keith Goodman <[EMAIL PROTECTED]> wrote: > That looks good. But at the end of the function I'll have to convert > back to a 1d array if the input is 1d > > np.whence_you_came_from(x) > > I guess there is no way to not test for the shape.
Well, in this case, since you are modifying the data in-place, just return the original array. x2 = atleast_2d(x) x2[i,j] = something return x -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth." -- Umberto Eco _______________________________________________ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-discussion