如图,用mindspore.numpy创建一个包含字符串的数组,甚至无法取值。报错信息如下
TypeError Traceback (most recent call last)
Cell In [153], line 1
----> 1 a[0]
File D:\Anaconda\envs\ms\lib\site-packages\mindspore\common\tensor.py:382, in Tensor.__getitem__(self, index)
381 def __getitem__(self, index):
--> 382 out = tensor_operator_registry.get('__getitem__')(self, index)
383 if out is not self:
384 out.parent_tensor_ = self
File D:\Anaconda\envs\ms\lib\site-packages\mindspore\ops\composite\multitype_ops\_compile_utils.py:57, in _tensor_getitem(self, index)
55 return _tensor_index_by_bool(self, index)
56 if isinstance(index, int):
---> 57 return _tensor_index_by_integer(self, index)
58 if isinstance(index, slice):
59 return tensor_index_by_slice(self, index)
File D:\Anaconda\envs\ms\lib\site-packages\mindspore\ops\composite\multitype_ops\_compile_utils.py:407, in _tensor_index_by_integer(data, int_index)
405 begin_mask += 2 ** i
406 end_mask += 2 ** i
--> 407 return strided_slice(data, begin_strides, end_strides, step_strides, begin_mask, end_mask, 0, 0, shrink_axis_mask)
File D:\Anaconda\envs\ms\lib\site-packages\mindspore\ops\composite\multitype_ops\_compile_utils.py:43, in strided_slice(data, begin_strides, end_strides, step_strides, begin_mask, end_mask, ellipsis_mask, new_axis_mask, shrink_axis_mask)
40 """strided_slice primitive cache"""
41 strided_slice_ = _get_cache_prim(P.StridedSlice)(begin_mask, end_mask, ellipsis_mask, new_axis_mask,
42 shrink_axis_mask)
---> 43 return strided_slice_(data, begin_strides, end_strides, step_strides)
File D:\Anaconda\envs\ms\lib\site-packages\mindspore\ops\primitive.py:294, in Primitive.__call__(self, *args)
292 if should_elim:
293 return output
--> 294 return _run_op(self, self.name, args)
File D:\Anaconda\envs\ms\lib\site-packages\mindspore\common\api.py:98, in _wrap_func.<locals>.wrapper(*arg, **kwargs)
96 @wraps(fn)
97 def wrapper(*arg, **kwargs):
---> 98 results = fn(*arg, **kwargs)
99 return _convert_python_data(results)
File D:\Anaconda\envs\ms\lib\site-packages\mindspore\ops\primitive.py:730, in _run_op(obj, op_name, args)
727 @_wrap_func
728 def _run_op(obj, op_name, args):
729 """Single op execution function supported by ge in PyNative mode."""
--> 730 output = real_run_op(obj, op_name, args)
731 return output
TypeError: Operator[StridedSlice] input(String) output(String) is not supported. This error means the current input type is not supported, please refer to the MindSpore doc for supported types.
----------------------------------------------------
- C++ Call Stack: (For framework developers)
----------------------------------------------------
mindspore\ccsrc\plugin\device\cpu\hal\hardware\cpu_device_context.cc:267 SetOperatorInfo
希望修复好后能用mindspore.numpy.append()和mindspore.numpy.insert()之类的接口操作,目前也是不行
Please assign maintainer to check this issue.
请为此issue分配处理人。
@fangwenyi @chengxiaoli
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。
Please add labels (comp or sig), also you can visit https://gitee.com/mindspore/community/blob/master/sigs/dx/docs/labels.md to find more.
为了让代码尽快被审核,请您为Pull Request打上 组件(comp)或兴趣组(sig) 标签,打上标签的PR可直接推送给责任人进行审核。
更多的标签可以查看https://gitee.com/mindspore/community/blob/master/sigs/dx/docs/labels.md
以组件相关代码提交为例,如果你提交的是data组件代码,你可以这样评论:
//comp/data
当然你也可以邀请data SIG组来审核代码,可以这样写:
//sig/data
另外你还可以给这个PR标记类型,例如是bugfix或者是特性需求:
//kind/bug or //kind/feature
恭喜你,你已经学会了使用命令来打标签,接下来就在下面的评论里打上标签吧!
你好,问题收到,我们已安排人员分析
您好,请问问题解决了吗
您好,由于问题单时间较长可能会有版本gap暂时关闭,如您尝试新版本仍无法解决,可以反馈下具体信息,并将ISSUE状态修改为WIP,我们这边会进一步跟踪,谢谢
登录 后才可以发表评论