Created
April 24, 2021 08:12
-
-
Save shubham0204/70fd2524d322c7b555d4a91f95ab5923 to your computer and use it in GitHub Desktop.
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
// Convert the given String[] to a Float[] | |
// Note: The `CSVReader` returns a row as String[] where each String is a number. We parse this String and convert it to | |
// a float. | |
fun convertStringArrayToFloatArray( strArray : Array<String> ) : FloatArray { | |
val out = strArray.map { si -> si.toFloat() }.toFloatArray() | |
return out | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment