https://kotlinlang.org logo
#datascience
Title
# datascience
a

Alexandre Brown

02/27/2023, 4:53 PM
Hello, is it possible to use Multik
cat
on an "empty" multik array? In Numpy we can do the following : https://stackoverflow.com/questions/22732589/concatenating-empty-array-in-numpy Currently I have the following : Peusdo code:
Copy code
val a = mutableListOf<List<Int>>()

for loop
   multikArray = function()
   a.add(multikArray.toList())

val b = mk.ndarray(a)
But It would be nice if I could do :
Copy code
val a = mk.ndarray(mk[])

for loop
   multikArray = function()
   a.cat(multikArray)
Ok turns out I found a way to do it.
p

Pavel Gorgulov

02/28/2023, 8:19 PM
The arrays themselves in multik are immutable. There are several operations that return “view”, but for any operation where consistency is important, the array will be copied
7 Views