Github user tomasatdatabricks commented on a diff in the pull request:
https://github.com/apache/spark/pull/20168#discussion_r161904121
--- Diff: python/pyspark/ml/tests.py ---
@@ -1843,6 +1844,28 @@ def tearDown(self):
class ImageReaderTest(SparkSessionTestCase):
+ def test_ocv_types(self):
+ ocvList = ImageSchema.ocvTypes
+ self.assertEqual("Undefined", ocvList[0].name)
+ self.assertEqual(-1, ocvList[0].mode)
+ self.assertEqual("N/A", ocvList[0].dataType)
+ for x in ocvList:
+ self.assertEqual(x, ImageSchema.ocvTypeByName(x.name))
+ self.assertEqual(x, ImageSchema.ocvTypeByMode(x.mode))
+
+ def test_conversions(self):
+ s = np.random.RandomState(seed=987)
+ ary_src = s.rand(4, 10, 10)
--- End diff --
Yes, that was the intention, good catch.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]