def rec_drop_fields(rec, names):
names = set(names)<EOL>Nr = len(rec)<EOL>newdtype = np.dtype([(name, rec.dtype[name]) for name in rec.dtype.names<EOL>if name not in names])<EOL>newrec = np.empty(Nr, dtype=newdtype)<EOL>for field in newdtype.names:<EOL><INDENT>newrec[field] = rec[field]<EOL><DEDENT>return rec_view(newrec)<EOL>
Return a new numpy record array with fields in *names* dropped.