Big Chungus
06/07/2022, 4:42 PMPavel Gorgulov
06/07/2022, 5:41 PMBig Chungus
06/07/2022, 5:42 PMBig Chungus
06/07/2022, 5:42 PMPavel Gorgulov
06/07/2022, 5:43 PMBig Chungus
06/07/2022, 5:43 PMPavel Gorgulov
06/07/2022, 6:16 PMrollfun D2Array<Int>.roll(n: Int): D2Array<Int> {
    val data = this.toList().also { Collections.rotate(it, n) }
    return D2Array(MemoryViewIntArray(data.toIntArray()), shape = this.shape.clone(), dim = this.dim)
}sliceArrayfun D2Array<Int>.roll(n: Int): D2Array<Int> {
    val newData = this.data.getIntArray().let { it.sliceArray(size - n until size) + it.sliceArray(0 until size - n) }
    return D2Array(MemoryViewIntArray(newData), shape = this.shape.clone(), dim = this.dim)
}Big Chungus
06/07/2022, 6:17 PMimg = np.roll(img, dy, axis=0)
 img = np.roll(img, dx, axis=1)Big Chungus
06/07/2022, 6:17 PMPavel Gorgulov
06/07/2022, 6:20 PMstridesBig Chungus
06/07/2022, 6:25 PMPavel Gorgulov
06/07/2022, 6:36 PMBig Chungus
06/07/2022, 6:36 PMaltavir
06/07/2022, 8:11 PMBig Chungus
06/07/2022, 8:20 PMBig Chungus
06/07/2022, 8:23 PMaltavir
06/08/2022, 5:47 AM