You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This throws java.lang.UnsupportedOperationException: empty.max :
scala> breeze.linalg.DenseMatrix.zeros[Int](0,2).toString
java.lang.UnsupportedOperationException: empty.max
at scala.collection.TraversableOnce$class.max(TraversableOnce.scala:201)
at scala.collection.immutable.Vector.max(Vector.scala:63)
at breeze.linalg.Matrix$class.colWidth$1(Matrix.scala:68)
at breeze.linalg.Matrix$class.toString(Matrix.scala:73)
The culprit is the following line:
defcolWidth(col : Int) =
(0 until showRows).map(row =>this(row,col).toString.length+2).max
Try the following in the REPL:
This works:
This throws java.lang.UnsupportedOperationException: empty.max :
The culprit is the following line:
which should be replaced by:
or something approaching.
Thanks for any correction!
Denis
The text was updated successfully, but these errors were encountered: