On Mon, Jun 4, 2012 at 9:38 AM, Robert Kern <[email protected]> wrote: > # Now use the numpy.delete() function to get the matrix > # with those rows and columns removed from the original matrix. > P = np.delete(M, bad_rows, axis=0) > P = np.delete(P, bad_cols, axis=1)
ah yes, forgot about np.delete -- that is a bit cleaner -- also, nonzero() rather than argwhere() is also cleaner. i.e. listen to Robert, not me! -Chris -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/OR&R (206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception [email protected] _______________________________________________ NumPy-Discussion mailing list [email protected] http://mail.scipy.org/mailman/listinfo/numpy-discussion
