Multik 0.2.1 version
⚠️ WARNING
In this release, the behavior of range for access has been changed.
The previous behavior of start..end
returned [start, end - 1]
.
Now start..end
will return [start, end]
.
For example:
val a = mk.arange<Int>(start = 0, stop = 5) // [0, 1, 2, 3, 4]
/*
* legacy: a[1..3] returns [1, 2]
*/
a[1..3] // returns [1, 2, 3]
in order to use the range as before you can:
start..(end - 1)
start until end
start..<end
- new in kotlin 1.7.20, more in the blog
Motivation
I made a mistaken previous decision in order to make a short and convenient entry. And also satisfy users from python.
But with the development of Kotlin and the addition of open-ended ranges, this was no longer necessary. This way the new behavior will be consistent with kotlin stdlib, and IDEA hints like start ≤ .. ≤ end
will no longer be misleading.
What's Changed
- changed behavior for ranges #138
- added new annotation
ExperimentalMultikApi
for experimental api - added a new function
createAlignedNDArray
for creating NDArrays from lists and arrays of different sizes #125 - support for all platforms added to
multik-default-jvm
. The exception is Android due to the peculiarities of the assembly; only arm64 is supported formultik-default
andmultik-openblas
#124 - added matrix norms to
multik-kotlin
#132