gpt4 book ai didi

python - python中的参数(-1,)是什么意思?

转载 作者:行者123 更新时间:2023-11-28 21:43:58 28 4
gpt4 key购买 nike

data = np.loadtxt('In_file', dtype=np.float, delimiter=',')

x_test, y_test = np.split(data, (-1, ), axis=1)

我知道这行代码将数据分为两部分,但是参数(-1,)是什么意思?

最佳答案

在索引 0 上值为 -1 的元组

关于python - python中的参数(-1,)是什么意思?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41458228/

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