gpt4 book ai didi

python - 一维 numpy 连接 : TypeError: only integer scalar arrays can be converted to a scalar index

转载 作者:太空狗 更新时间:2023-10-29 17:52:18 29 4
gpt4 key购买 nike

<分区>

我想将 numpy 数组存储到另一个 numpy 数组中

我正在使用 np.concatenate

这是我的代码

x=np.concatenate(x,s_x)

这些是 x 和 s_x 的类型和形状

Type of s_x: <class 'numpy.ndarray'>, Shape of s_x: (173,)
Type of x: <class 'numpy.ndarray'> (0,), Shape of x: (0,)

这是显示的错误

TypeError: only integer scalar arrays can be converted to a scalar index

29 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com