mindspore.ops.tuple_to_array ============================== .. image:: https://mindspore-website.obs.cn-north-4.myhuaweicloud.com/website-images/br_base/resource/_static/logo_source.svg :target: https://gitee.com/mindspore/mindspore/blob/br_base/docs/api/api_python/ops/mindspore.ops.func_tuple_to_array.rst :alt: 查看源文件 .. py:function:: mindspore.ops.tuple_to_array(input_x) 将tuple转换为tensor。 .. note:: 如果tuple中第一个数据类型为int,则输出tensor的数据类型为int。否则,输出tensor的数据类型为float。 参数: - **input_x** (tuple) - 数值型组成的tuple。仅支持常量值。 返回: Tensor