All Downloads are FREE. Search and download functionalities are using the official Maven repository.

extensions.simpleMatrixExtensions.kt Maven / Gradle / Ivy

package extensions
import org.ejml.simple.SimpleMatrix

fun SimpleMatrix?.toPythonArrayStringOrEmpty(): String {
    return if (this == null) "\'\'" else "[${(0..this.numCols()).joinToString(separator = ",")}]"
}

fun SimpleMatrix?.toPythonMatrixStringOrNone(): String {
    return if (this == null) "None" else "[${(0..this.numRows()).joinToString(separator = ",") { this.rows(it,it).toPythonArrayStringOrEmpty() }}]"
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy