Github user WeichenXu123 commented on a diff in the pull request:

    https://github.com/apache/spark/pull/17968#discussion_r143702719
  
    --- Diff: python/pyspark/mllib/linalg/__init__.py ---
    @@ -1131,14 +1131,17 @@ def __getitem__(self, indices):
                 return self.values[i + j * self.numRows]
     
         def __eq__(self, other):
    +        if isinstance(other, SparseMatrix):
    +            return np.all(self.toArray() == other.toArray())
             if (not isinstance(other, DenseMatrix) or
    --- End diff --
    
    ditto.


---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to