zero323 commented on a change in pull request #30413:
URL: https://github.com/apache/spark/pull/30413#discussion_r529829185



##########
File path: python/pyspark/mllib/util.py
##########
@@ -273,24 +317,30 @@ def convertVectorColumnsFromML(dataset, *cols):
         return callMLlibFunc("convertVectorColumnsFromML", dataset, list(cols))
 
     @staticmethod
-    @since("2.0.0")
     def convertMatrixColumnsToML(dataset, *cols):
         """
         Converts matrix columns in an input DataFrame from the
         :py:class:`pyspark.mllib.linalg.Matrix` type to the new
         :py:class:`pyspark.ml.linalg.Matrix` type under the `spark.ml`
         package.
 
-        :param dataset:
-          input dataset
-        :param cols:
-          a list of matrix columns to be converted.
-          New matrix columns will be ignored. If unspecified, all old
-          matrix columns will be converted excepted nested ones.
-        :return:
-          the input dataset with old matrix columns converted to the
-          new matrix type
+        .. versionadded:: 2.0.0
 
+        dataset : :py:class:`pyspark.sql.DataFrame`
+            input dataset
+        cols : str

Review comment:
       That's a good question. Looking at 
[`numpy.ndarray.item`](https://numpy.org/devdocs/reference/generated/numpy.ndarray.item.html)
 we should make varargs explicit
   
       *cols : ...
   
   As of type I was thinking `str` as we support variable number of `str` 
values, but looking at the code, a single `List[str]` would do as well.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to