Say I create the following numpy arrays of strings:
>>> np.array(['1.12', '-9.2', '42'], dtype=np.string_)
array([b'1.12', b'-9.2', b'42'], dtype='|S4')
>>> np.array(['1.12', '-9.2', '42'])
array(['1.12', '-9.2', '42'], dtype='<U4')
What do the types '|S4'
and '<U4'
mean? What is the size of a character with each?