stringVector(0) error
li-fcb1899 opened this issue · comments
li-fcb1899 commented
Describe the bug
Exception in thread "main" java.lang.ClassCastException: class smile.data.vector.VectorImpl cannot be cast to class smile.data.vector.StringVector (smile.data.vector.VectorImpl and smile.data.vector.StringVector are in unnamed module of loader 'app')
Expected behavior
get StringVector
Actual behavior
println(stringVector(0).toDate("M/d/yyyy").toArray().contentToString())
Additional context
Orack JDK 21.0.1
Smile-kotlin 3.0.2
Windows
Haifeng Li commented
No need to call toArray(). Use stream instead.