numpy.ufunc.types#

属性

ufunc.types#

返回一个按输入->输出分组的类型列表。

数据属性,列出 ufunc 可以提供的“域-范围”数据类型分组。数据类型使用字符代码表示。

另请参阅

numpy.ufunc.ntypes

示例

>>> import numpy as np
>>> np.add.types
['??->?', 'bb->b', 'BB->B', 'hh->h', 'HH->H', 'ii->i', 'II->I', ...
>>> np.power.types
['bb->b', 'BB->B', 'hh->h', 'HH->H', 'ii->i', 'II->I', 'll->l', ...
>>> np.exp.types
['e->e', 'f->f', 'd->d', 'f->f', 'd->d', 'g->g', 'F->F', 'D->D', 'G->G', 'O->O']
>>> np.remainder.types
['bb->b', 'BB->B', 'hh->h', 'HH->H', 'ii->i', 'II->I', 'll->l', ...