np.add.types what does mean the characters listed?

Viewed 45

When I type np.add.types, it shows the following:

['??->?',
 'bb->b',
 'BB->B',
 'hh->h',
 'HH->H',
 'ii->i',
 'II->I',
 'll->l',
 'LL->L',
 'qq->q',
 'QQ->Q',
 'ee->e',
 'ff->f',
 'dd->d',
 'gg->g',
 'FF->F',
 'DD->D',
 'GG->G',
 'Mm->M',
 'mm->m',
 'mM->M',
 'OO->O']

Is there an explanation of those symbols. I understand that they are the data types that ufunc support in the package numpy, but how could I interpret that?

1 Answers

Those represent data types and what you get when you apply the function to them. For example if you add two bool types ? you get another bool (??->?), and if you add one datetime and one timedelta, you get a datetime Mm->M.

Check the lists here and here.

Related