mindspore.ops.IsSubClass

class mindspore.ops.IsSubClass(*args, **kwargs)[source]

Checks whether this type is a sub-class of another type.

Inputs:
  • sub_type (mindspore.dtype) - The type to be checked. Only constant value is allowed.

  • type_ (mindspore.dtype) - The target type. Only constant value is allowed.

Outputs:

bool, the check result.

Raises

TypeError – If sub_type or type_ is not a Type.

Supported Platforms:

Ascend GPU CPU

Examples

>>> output = ops.IsSubClass()(mindspore.int32,  mindspore.intc)
>>> print(output)
True