Creating a Breeze DenseMatrix using an existing List of Lists in Scala

泪湿孤枕 提交于 2019-12-01 21:41:53

There's not great syntax for this yet. I actually ran into it today, so I'll probably add better support for it soon. In the meantime, DenseMatrix(array1, array2, array3) works. So:

val listOfLists : List[List[Int]] = ???

DenseMatrix(listOfLists.map(_.toArray):_*)

Not the prettiest, but I'll add better support if you open a ticket.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!