Details
Description
There is a bug in this line: https://github.com/apache/spark/blob/f17d43b033d928dbc46aef8e367aa08902e698ad/python/pyspark/mllib/regression.py#L138
You can reproduce this bug as follows:
>>> from numpy import array >>> a = array([1,2,3]) >>> b = a or [1.0] * 3 Traceback (most recent call last): File "<stdin>", line 1, in <module> ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()