mindspore/docs/api/api_python/ops/mindspore.ops.IsInstance.rst

16 lines
443 B
ReStructuredText
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

mindspore.ops.IsInstance
=========================
.. py:class:: mindspore.ops.IsInstance
检查输入对象是否为目标类型的实例。
输入:
- **inst** (Any Object) - 要检查的实例。只允许为常量。
- **type_** (mindspore.dtype) - 目标类型。只允许为常量。
输出:
bool检查结果。
异常:
- **TypeError** - 如果 `type_` 不是一种类型。