scalanlp / breeze

Breeze is a numerical processing library for Scala.
www.scalanlp.org
Apache License 2.0
3.44k stars 691 forks source link

.toScalaVector() gives SeqOps error #824

Closed Quafadas closed 2 years ago

Quafadas commented 2 years ago

https://scastie.scala-lang.org/Quafadas/8PLGVS6uTn214j14p1LgMQ

val dv = breeze.linalg.DenseVector[Int](1,2,3,4,5)
dv.toScalaVector()

missing argument for parameter i of method apply in trait SeqOps: (i: Int): Int

I get this with Breeze 2.0 and scala 3.1.0

dlwh commented 2 years ago

toScalaVector doesn't have an argument list so the compiler thinks you're trying to invoke the apply method of the returned Vector. Just remove the parentheses

On Thu, Nov 11, 2021, 1:04 PM Simon Parten @.***> wrote:

https://scastie.scala-lang.org/Quafadas/8PLGVS6uTn214j14p1LgMQ

val dv = breeze.linalg.DenseVectorInt dv.toScalaVector()

missing argument for parameter i of method apply in trait SeqOps: (i: Int): Int

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/scalanlp/breeze/issues/824, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAACLIOC7WSLLQWMJXXZO4TULQVV7ANCNFSM5H3LDJGQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

Quafadas commented 2 years ago

Oh dear, that's embarrassing. THankyou for the quick reply.