On 3/5/2007 2:13 PM, David Koch wrote: > - Given a matrix R, is there an equvialent to the Matlab > operation R(:,j) = [] (which removes column j and > "shrinks" the matrix?
>>> help(numpy.delete) Help on function delete in module numpy.lib.function_base: delete(arr, obj, axis=None) Return a new array with sub-arrays along an axis deleted. Return a new array with the sub-arrays (i.e. rows or columns) deleted along the given axis as specified by obj obj may be a slice_object (s_[3:5:2]) or an integer or an array of integers indicated which sub-arrays to remove. If axis is None, then ravel the array first. Example: >>> arr = [[3,4,5], [1,2,3], [6,7,8]] >>> delete(arr, 1, 1) array([[3,5], [1,3], [6,8]) >>> delete(arr, 1, 0) array([[3,4,5], [6,7,8]]) hth, Alan Isaac _______________________________________________ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-discussion