This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import kotlin.math.* | |
/** | |
* Returns [num] evenly spaced samples, calculated over the interval [0, [max]]. | |
*/ | |
fun linspace(num: Int, max: Double): DoubleArray | |
= DoubleArray(num) { it * max / (num - 1.0) } | |
/** | |
* Returns a sequence of numbers starting from [start], incrementing by [stop] and stopping before [stop]. |
NewerOlder