let's say we have this structured array :
x = np.array([('Rex', 9, 81.0), ('Fido', 3, 27.0)],
dtype=[('name', 'U10'), ('age', 'i4'), ('weight', 'f4')])
how to delete the first row :('Rex', 9, 81.0) ? and how add another row ??
let's say we have this structured array :
x = np.array([('Rex', 9, 81.0), ('Fido', 3, 27.0)],
dtype=[('name', 'U10'), ('age', 'i4'), ('weight', 'f4')])
how to delete the first row :('Rex', 9, 81.0) ? and how add another row ??
Copyright © 2021 Jogjafile Inc.
Are you wanting this: (with
np.insert)Or with
np.appendandnp.delete: