Github user yu-iskw commented on the pull request:
https://github.com/apache/spark/pull/1964#issuecomment-53129462
Good Morning @erikerlandson,
Thank you for telling me the documentation.
But I can not compile, if I changed the code in ChebyshevDistanceMetric.
I guess that breeze.numerics doesn't have abs() for a vector.
Although I read the source code of Breeze, I couldn't find.
## Sample Change
```
before: val diff = (v1 - v2).map(Math.abs)
after: val diff = abs(v1 - v2)
```
## Error Message
```
Error:(99, 19) ambiguous implicit values:
both method mapUFuncImpl in object Vector of type [Tag, V, U](implicit
impl: breeze.generic.UFunc.UImpl[Tag,V,U], implicit canMapValues:
breeze.linalg.support.CanMapValues[breeze.linalg.Vector[V],V,U,breeze.linalg.Vector[U]])breeze.generic.UFunc.UImpl[Tag,breeze.linalg.Vector[V],breeze.linalg.Vector[U]]
and method fromLowOrderCanMapValues in trait MappingUFunc of type [T, V,
V2, U](implicit handhold: breeze.linalg.support.CanMapValues.HandHold[T,V],
implicit impl: breeze.numerics.package.abs.Impl[V,V2], implicit canMapValues:
breeze.linalg.support.CanMapValues[T,V,V2,U])breeze.numerics.package.abs.Impl[T,U]
match expected type
breeze.numerics.abs.Impl[breeze.linalg.Vector[Double],VR]
val diff = abs(v1 - v2)
^
```
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]