cgarciae
(Cristian Garcia)
1
Hey Swift Community!
I was attracted to Swift a few months ago thanks to the TensorFlow project, since I dedicate myself to Machine Learning I was impressed by a talk by @Chris_Lattner3 . Data science is a relatively new topic for the Swift community but I have a strong feeling that Swift could excel at it given how easy it is to wrap C libraries and write efficient parallel code (good-bye GIL).
I am happy to share with you NDArray, a multidimensional array library (like Numpy) for Swift. I've been taking strong queues from TensorFlow Tensor API, Numpys documentation and some other attempts at the problem that Swifters have used in the past. I've learned a lot and the journey just started!
Link: GitHub - cgarciae/NDArray: A Multidimensional Array library for Swift
NDArray
NDArray is a multidimensional array library written in Swift that aims to become the equivalent of numpy in Swift's emerging data science ecosystem. This project is in a very early stage and has a long but exciting road ahead!
Goals
- Have an efficient multidimensional array interface with common things like indexing, slicing, broadcasting, etc.
- Create specialized implementations of linear algebra operations for NDArrays containing numeric types using libraries like BLAS and LAPACK.
- Make
NDArray and its operations differentiable so its usable along with Swift for TensorFlow.
7 Likes
AlexanderM
(Alexander Momchilov)
2
Looks cool. Have you considered conforming to ExpressibleByArrayLiteral? Also, what's the difference between NDArray._shape.dimensionLengths and NDArray.data.map { $0.count }?
cgarciae
(Cristian Garcia)
4
@scanon This is an initial attempt to what was discussed in another post. You seem to have a lot of knowledge on this domain, if you have the time it would be helpful if you had a look, would really appreciate it.