Answers for "np.array([(1,2),(3,4)],dtype"

0

np.array([(1,2),(3,4)],dtype

>>> x = np.array([('Rex', 9, 81.0), ('Fido', 3, 27.0)],
...              dtype=[('name', 'U10'), ('age', 'i4'), ('weight', 'f4')])
>>> x
array([('Rex', 9, 81.), ('Fido', 3, 27.)],
      dtype=[('name', 'U10'), ('age', '<i4'), ('weight', '<f4')])
Posted by: Guest on May-27-2021

Browse Popular Code Answers by Language