first I saw similar questions but nothing helped me.
I'm trying to sort list of tuples, and convert the data types inside the tuple,
convert it according to a list of tuples I get.
for example, if I have a list of tuple, every tuple is built like
(ID,Grade,Height)

A = [(123,23,67),(234,67,45)]

and I have a list of type like that:
[(ID,int),(grade,'s15'),(height,float)]
now I read that 's15' is a dtype from bumpy, but I can't seem to use it.
I tried to copy from the docs:
import numpy as np
dt = np.dtype(('>14'))

but all I get is this error:
dt = np.dtype(('>14'))
TypeError: data type '>' not understood

the docs I copied from:
https://numpy.org/doc/stable/reference/arrays.dtypes.html
and is there a generic converter I can use to convert to any type I'm given?

TypeError: data type '>' not understood using dtype from numpy
I think you maybe overlooked the documentation you are referring.
You used
dt = np.dtype(('>14'))

which is >14 (fourteen)...
But in fact the documentation clearly mentions
dt = np.dtype('>i4')

which is i4 not 1 (one)
Also based on the docs > or < specifies upper/lower bound for each dtype, for example >i would be big endian integer (see Endianess)
And the number after that would indicate number of bytes given to the dtype (see docs)
Finally the S indicates Zero terminated bytes
Based on your description, your teacher wants Upper endian ~128 bit Zero terminated bytes
Furthermore,
dt = np.dtype(('>S15'))

works fine.
I hope this fixes your issue
