KMath
Could be pronounced as key-math
. The Kotlin Mathematics library was initially intended as a Kotlin-based
analog to Python's NumPy library. Later we found that kotlin is much more flexible language and allows superior
architecture designs. In contrast to numpy
and scipy
it is modular and has a lightweight core. The numpy
-like
experience could be achieved with kmath-for-real extension module.
Publications and talks
- A conceptual article about context-oriented design
- Another article about context-oriented design
- ACAT 2019 conference paper
Goal
- Provide a flexible and powerful API to work with mathematics abstractions in Kotlin-multiplatform (JVM, JS and Native) .
- Provide basic multiplatform implementations for those abstractions (without significant performance optimization).
- Provide bindings and wrappers with those abstractions for popular optimized platform libraries.
Non-goals
- Be like NumPy. It was the idea at the beginning, but we decided that we can do better in API.
- Provide the best performance out of the box. We have specialized libraries for that. Need only API wrappers for them.
- Cover all cases as immediately and in one bundle. We will modularize everything and add new features gradually.
- Provide specialized behavior in the core. API is made generic on purpose, so one needs to specialize for types, like
for
Double
in the core. For that we will have specialization modules likekmath-for-real
, which will give better experience for those, who want to work with specific types.