Avatar
MLにスタッククラスという機能の話題が出てて、 それって moveonly struct じゃダメなんかな、と思いつつ眺めてたら、 John McCall がそう返信してた。
Move-only struct types will be able to provide deinit. See the ownership manifesto.
👍 1
📍 1
2:01 AM
[swift-evolution] [Discussion] Swift for Data Science / ML / Big Data analytics ラトナの返信
In short, I think we should build a simple Swift/Python interop story.
let np = Python.import(“numpy”) // Returns a value of type Python.Object. let a = np.array([1, 2, 3]) print(type(a)) // Whether we want to support type(x) or use the Swift equivalent would be up for discussion of course! print(a.shape) print(a[0], a[1], a[2]) a[0] = 5 print(a) let b = np.array([[1,2,3],[4,5,6]]) print(b.shape) print(b[0, 0], b[0, 1], b[1, 0])