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

    https://github.com/apache/spark/pull/5872#discussion_r29812042
  
    --- Diff: python/pyspark/mllib/linalg.py ---
    @@ -633,6 +703,38 @@ def stringify(vector):
             """
             return str(vector)
     
    +    @staticmethod
    +    def squared_distance(a, b):
    +        """
    +        Squared distance between two vectors.
    +        a and b can be of type SparseVector, DenseVector, np.ndarray
    +        or array.array.
    +
    +        >>> a = Vectors.sparse(4, [(0, 1), (3, 4)])
    +        >>> b = Vectors.dense([2, 5, 4, 1])
    +        >>> a.squared_distance(b)
    +        51.0
    +        """
    +        a, b = _convert_to_vector(a), _convert_to_vector(b)
    +        return a.squared_distance(b)
    +
    +    @staticmethod
    +    def norm(vec, p):
    --- End diff --
    
    Can the argument please be "vector" instead of "vec" to match Scala?


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