def rec_drop_fields(rec, names):
 names = set(names)
 newdtype = np.dtype([(name, rec.dtype[name]) for name in rec.dtype.names if (name not in names)])
 newrec = np.recarray(rec.shape, dtype=newdtype)
 for field in newdtype.names:
  newrec[field] = rec[field]
 return newrec

def rec_drop_fields ( rec , names ) : names = set ( names ) newdtype = np . dtype ( [ ( name , rec . dtype [ name ] ) for name in rec . dtype . names if ( name not in names ) ] ) newrec = np . recarray ( rec . shape , dtype = newdtype ) for field in newdtype . names : newrec [ field ] = rec [ field ] return newrec
return a new numpy record array with fields in *names* dropped .