Movatterモバイル変換


[0]ホーム

URL:


SciPy

numpy.issubclass_

numpy.issubclass_(arg1,arg2)[source]

Determine if a class is a subclass of a second class.

issubclass_ is equivalent to the Python built-inissubclass,except that it returns False instead of raising a TypeError if oneof the arguments is not a class.

Parameters:
arg1:class

Input class. True is returned ifarg1 is a subclass ofarg2.

arg2:class or tuple of classes.

Input class. If a tuple of classes, True is returned ifarg1 is asubclass of any of the tuple elements.

Returns:
out:bool

Whetherarg1 is a subclass ofarg2 or not.

Examples

>>>np.issubclass_(np.int32,int)True>>>np.issubclass_(np.int32,float)False

Previous topic

numpy.issubsctype

Next topic

numpy.find_common_type

Quick search

  • © Copyright 2008-2018, The SciPy community.
  • Last updated on Jul 24, 2018.
  • Created usingSphinx 1.6.6.

[8]ページ先頭

©2009-2025 Movatter.jp