haifengl / smile

Statistical Machine Intelligence & Learning Engine

Home Page:https://haifengl.github.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

stringVector(0) error

li-fcb1899 opened this issue · comments

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())

Code snippet
image

Additional context
Orack JDK 21.0.1
Smile-kotlin 3.0.2
Windows

No need to call toArray(). Use stream instead.