Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
yt_arr = YTArray([]) for i in range(10): yt_arr.append(i)
这种特殊类型的代码返回一个错误,指出YTArray没有属性append。那么如何在数组中附加值呢?
YTArray
append
您可以将内容附加到 alist并稍后将其转换为YTArray对象。
list
arr = [] yt_arr = YTArray([]) for i in range(10): arr.append(i) yt_arr = YTArray(arr,'cm') # add your symbolic reference here