Skip to content

Multik 0.2.1 version

Compare
Choose a tag to compare
@devcrocod devcrocod released this 19 Sep 21:04
· 100 commits to master since this release

⚠️ 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 for multik-default and multik-openblas #124
  • added matrix norms to multik-kotlin #132

Fixes

  • fixed initialization of engines for Kotlin/JS #139
  • fixed some bugs related to copying to multik-openblas for Kotlin/Native
  • fixed dimension for returned NDArray in sumDN, minDN and others #137
  • fixed a bug in JNI for Android #146