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

    https://github.com/apache/spark/pull/17421#discussion_r108023069
  
    --- Diff: python/pyspark/ml/tests.py ---
    @@ -1692,6 +1692,23 @@ def test_new_java_array(self):
             self.assertEqual(_java2py(self.sc, java_array), [])
     
     
    +class ChiSquareTestTests(SparkSessionTestCase):
    +
    +    def test_ChiSquareTest(self):
    +        labels = [1, 2, 0]
    +        vectors = [_convert_to_vector([0, 1, 2]),
    +                   _convert_to_vector([1, 1, 1]),
    +                   _convert_to_vector([2, 1, 0])]
    +        data = zip(labels, vectors)
    --- End diff --
    
    It can also be nicer to write this in a per-row format, rather than zipping 
labels and vectors which are defined separately.  See other examples of 
createDataFrame in this file.


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

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

Reply via email to