numpy.issubdtype()

numpy.issubdtype

numpy.issubdtype(arg1, arg2) [source]

Returns True if first argument is a typecode lower/equal in type hierarchy.

Parameters:

arg1, arg2 : dtype_like

dtype or string representing a typecode.

Returns:

out : bool

See also

issubsctype, issubclass_

numpy.core.numerictypes
Overview of numpy type hierarchy.

Examples

>>> np.issubdtype('S1', str)
True
>>> np.issubdtype(np.float64, np.float32)
False

© 2008–2017 NumPy Developers
Licensed under the NumPy License.
https://docs.scipy.org/doc/numpy-1.12.0/reference/generated/numpy.issubdtype.html

在线笔记
App下载
App下载

扫描二维码

下载编程狮App

公众号
微信公众号

编程狮公众号

意见反馈
返回顶部