Github user jkbradley commented on a diff in the pull request:
https://github.com/apache/spark/pull/9916#discussion_r49392967
--- Diff:
mllib/src/main/scala/org/apache/spark/mllib/linalg/distributed/BlockMatrix.scala
---
@@ -332,18 +336,18 @@ class BlockMatrix @Since("1.3.0") (
if (rowsPerBlock == other.rowsPerBlock && colsPerBlock ==
other.colsPerBlock) {
val addedBlocks = blocks.cogroup(other.blocks, createPartitioner())
.map { case ((blockRowIndex, blockColIndex), (a, b)) =>
- if (a.size > 1 || b.size > 1) {
- throw new SparkException("There are multiple MatrixBlocks with
indices: " +
- s"($blockRowIndex, $blockColIndex). Please remove them.")
- }
- if (a.isEmpty) {
- new MatrixBlock((blockRowIndex, blockColIndex), b.head)
- } else if (b.isEmpty) {
- new MatrixBlock((blockRowIndex, blockColIndex), a.head)
- } else {
- val result = a.head.toBreeze + b.head.toBreeze
- new MatrixBlock((blockRowIndex, blockColIndex),
Matrices.fromBreeze(result))
- }
+ if (a.size > 1 || b.size > 1) {
--- End diff --
You shifted left by 2 spaces. If you develop using IntelliJ Idea and run
```build/sbt gen-idea``` before opening the project, then it should (mostly) do
these indents automatically & correctly.
---
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]