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

    https://github.com/apache/spark/pull/9441#discussion_r43831342
  
    --- Diff: python/pyspark/mllib/linalg/distributed.py ---
    @@ -500,6 +661,25 @@ def numCols(self):
             """
             return self._java_matrix_wrapper.call("numCols")
     
    +    def transpose(self):
    +        """
    +        Transpose this CoordinateMatrix.
    +
    +        >>> entries = sc.parallelize([MatrixEntry(0, 0, 1.2),
    +        ...                           MatrixEntry(1, 0, 2),
    +        ...                           MatrixEntry(2, 1, 3.7)])
    +        >>> mat = CoordinateMatrix(entries)
    +        >>> mat_transposed = mat.transpose()
    +
    --- End diff --
    
    Yeah, I like the visual clarity when viewing these tests on the Python 
docs, as it helps indicate that the following two tests rely on the data 
structures formed above.  This is generally the pattern I've followed with 
these classes for cases with >1 test.


---
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]

Reply via email to