HyukjinKwon commented on a change in pull request #23571: [SPARK-26640][CORE][ML][SQL][STREAMING][PYSPARK] Code cleanup from lgtm.com analysis URL: https://github.com/apache/spark/pull/23571#discussion_r248558892
########## File path: python/pyspark/mllib/classification.py ########## @@ -20,12 +20,10 @@ import warnings import numpy -from numpy import array Review comment: Hm, right, so this looks false positive. It's passed via module's namespaces via `__dict__`. when it runs doc test. This could be fixed: 1. fix it within `def _test` ```python from numpy import array globs['array'] = array ``` 2. Explicitly import NumPy's `array` within each doctest - `array` in the doctest confusing between `array.array` and `numpy.array` anyway. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
