Python 中可以通过将集合转换为列表,再使用numpy的array函数将列表转换为numpy数组。代码如下: import numpy as np my_set = {1, 2, 3} my_list = list(my_set) ...
確定! 回上一頁