Spec-Zone.ru › NumPy 1.18

numpy.maximum_sctype

numpy.maximum_sctype(t) [source]

Возвращает скалярный тип наивысшей точности того же вида, что и входной.

Параметры
tdtype or dtype specifier

Тип входных данных. Это может быть объект dtype или объект, преобразуемый в dtype.

Возвращает
outdtype

Тип данных наивысшей точности того же вида (dtype.kind) что и t.

См. также

obj2sctype, mintypecode, sctype2char, dtype

Примеры

>>> np.maximum_sctype(int)
<class 'numpy.int64'>
>>> np.maximum_sctype(np.uint8)
<class 'numpy.uint64'>
>>> np.maximum_sctype(complex)
<class 'numpy.complex256'> # may vary
>>> np.maximum_sctype(str)
<class 'numpy.str_'>
>>> np.maximum_sctype('i2')
<class 'numpy.int64'>
>>> np.maximum_sctype('f4')
<class 'numpy.float128'> # may vary

© 2005–2020 NumPy Developers
Licensed under the 3-clause BSD License.
https://numpy.org/doc/1.18/reference/generated/numpy.maximum_sctype.html

Spec-Zone.ru

Настройки Оффлайн Что нового Помощь О нас
Spec-Zone .ru
спецификации, руководства, описания, API