设计
模型库
API
API映射
迁移指南
语法支持
环境变量
FAQ
RELEASE NOTES
将Python数据类型转换为MindSpore数据类型。
obj (type) - Python数据对象。
MindSpore的数据类型。
NotImplementedError - Python类型无法转换为MindSpore类型。
样例:
>>> import mindspore as ms >>> out = ms.pytype_to_dtype(bool) >>> print(out) Bool