Skip to content

Commit

Permalink
[SPARK-13937] Changed JavaWrapper _java_obj from static to member var…
Browse files Browse the repository at this point in the history
…iable
  • Loading branch information
BryanCutler committed Mar 16, 2016
1 parent d9e8f26 commit 41341e7
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions python/pyspark/ml/wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,15 @@ class JavaWrapper(Params):

__metaclass__ = ABCMeta

#: The wrapped Java companion object. Subclasses should initialize
#: it properly. The param values in the Java object should be
#: synced with the Python wrapper in fit/transform/evaluate/copy.
_java_obj = None
def __init__(self):
"""
Initialize the wrapped java object to None
"""
super(JavaWrapper, self).__init__()
#: The wrapped Java companion object. Subclasses should initialize
#: it properly. The param values in the Java object should be
#: synced with the Python wrapper in fit/transform/evaluate/copy.
self._java_obj = None

@staticmethod
def _new_java_obj(java_class, *args):
Expand Down

0 comments on commit 41341e7

Please sign in to comment.