Github user jkbradley commented on a diff in the pull request:
https://github.com/apache/spark/pull/11939#discussion_r59822525
--- Diff: python/pyspark/ml/feature.py ---
@@ -1743,22 +1745,25 @@ def setStopWords(self, value):
"""
Specify the stopwords to be filtered.
"""
- self._paramMap[self.stopWords] = value
+ self._set(stopWords=value)
return self
@since("1.6.0")
def getStopWords(self):
"""
Get the stopwords.
"""
- return self.getOrDefault(self.stopWords)
+ stopwords = self.getOrDefault(self.stopWords)
+ if isinstance(stopwords, JavaArray):
--- End diff --
This should be handled when the Param is set, not in the getter. I wrote a
little patch to test this. Since we may want to backport the patch, I'll send
it as a separate PR and CC you on it. We can merge it quickly and then get
yours merged afterwards.
---
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 [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]