Skip to content

Commit

Permalink
Alphabetize and correct error message
Browse files Browse the repository at this point in the history
  • Loading branch information
MechCoder committed Feb 10, 2015
1 parent e180f4c commit 5e096bd
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@ package org.apache.spark.mllib.clustering

import scala.collection.mutable.IndexedSeq

import breeze.linalg.{DenseVector => BDV, Vector => BV, SparseVector => BSV,
DenseMatrix => BreezeMatrix, diag, Transpose}
import breeze.linalg.{diag, DenseMatrix => BreezeMatrix, DenseVector => BDV, SparseVector => BSV,
Transpose, Vector => BV}

import org.apache.spark.annotation.Experimental
import org.apache.spark.mllib.linalg.{Matrices, Vector, Vectors, DenseVector,
SparseVector, DenseMatrix, BLAS}
import org.apache.spark.mllib.linalg.{BLAS, DenseVector, DenseMatrix, Matrices,
SparseVector, Vector, Vectors}
import org.apache.spark.mllib.stat.distribution.MultivariateGaussian
import org.apache.spark.mllib.util.MLUtils
import org.apache.spark.rdd.RDD
Expand Down
4 changes: 2 additions & 2 deletions mllib/src/main/scala/org/apache/spark/mllib/linalg/BLAS.scala
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ private[spark] object BLAS extends Serializable with Logging {
def syr(alpha: Double, x: DenseVector, A: DenseMatrix) {
val mA = A.numRows
val nA = A.numCols
require(mA == nA, s"A is not a symmetric matrix. A: $mA x $nA")
require(mA == nA, s"A is not a square matrix. A: $mA x $nA")
require(mA == x.size, s"The size of x doesn't match the rank of A. A: $mA x $nA, x: ${x.size}")

nativeBLAS.dsyr("U", x.size, alpha, x.values, 1, A.values, nA)
Expand All @@ -259,7 +259,7 @@ private[spark] object BLAS extends Serializable with Logging {
def syr(alpha: Double, x: SparseVector, A: DenseMatrix) {
val mA = A.numRows
val nA = A.numCols
require(mA == nA, s"A is not a symmetric matrix. A: $mA x $nA")
require(mA == nA, s"A is not a square matrix. A: $mA x $nA")
require(mA == x.size, s"The size of x doesn't match the rank of A. A: $mA x $nA, x: ${x.size}")

val zipIndVal = (x.indices zip x.values)
Expand Down

0 comments on commit 5e096bd

Please sign in to comment.