scalanlp / breeze

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

Implicit not found in 2.0-RC3 #821

Closed Arthurm1 closed 3 years ago

Arthurm1 commented 3 years ago

Using breeze_2.13-2.0-RC3 I get an implicit search error on the last line...

import scala.collection.immutable.{Vector => sVector}

val dataMatrix: DenseMatrix[Double] = ???
val rows: BroadcastedRows[DenseMatrix[Double], DenseVector[Double]] = dataMatrix(*, ::)
val denseV: DenseVector[sVector[Double]] = rows.map(dv => dv.toScalaVector)
[E]      could not find implicit value for parameter cmv: breeze.linalg.support.CanMapValues[breeze.linalg.BroadcastedRows[breeze.linalg.DenseMatrix[Double],breeze.linalg.DenseVector[Double]],breeze.linalg.DenseVector[Double],Vector[Double],breeze.linalg.DenseVector[scala.collection.immutable.Vector[Double]]]
[E]      L35:     val denseV: DenseVector[sVector[Double]] = rows.map(dv => dv.toScalaVector)
[E]                                                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

This isn't my code (although I've tried to minimize it). It works in Breeze _2.13-1.3

Is this a bug with 2.0-RC3 or do I need to change something?

dlwh commented 3 years ago

It's a bug. I'll try to fix

On Tue, Aug 24, 2021 at 6:51 AM Arthur McGibbon @.***> wrote:

Using breeze_2.13-2.0-RC3 I get an implicit search error on the last line...

import scala.collection.immutable.{Vector => sVector}

val dataMatrix: DenseMatrix[Double] = ??? val rows: BroadcastedRows[DenseMatrix[Double], DenseVector[Double]] = dataMatrix(*, ::) val denseV: DenseVector[sVector[Double]] = rows.map(dv => dv.toScalaVector)

[E] could not find implicit value for parameter cmv: breeze.linalg.support.CanMapValues[breeze.linalg.BroadcastedRows[breeze.linalg.DenseMatrix[Double],breeze.linalg.DenseVector[Double]],breeze.linalg.DenseVector[Double],Vector[Double],breeze.linalg.DenseVector[scala.collection.immutable.Vector[Double]]] [E] L35: val denseV: DenseVector[sVector[Double]] = rows.map(dv => dv.toScalaVector) [E] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

This isn't my code (although I've tried to minimize it). It works in Breeze _2.13-1.3

Is this a bug with 2.0-RC3 or do I need to change something?

— 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/821, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAACLIOGPNAX5ZBTDF7A6QTT6OPVFANCNFSM5CW4L4NA . 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&utm_campaign=notification-email .