Skip to content

Commit

Permalink
copy
Browse files Browse the repository at this point in the history
  • Loading branch information
MechCoder committed Jun 29, 2015
1 parent 95f7ff2 commit 40a5eb2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion python/pyspark/ml/wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ def __init__(self, java_model):
self._java_obj = java_model
self.uid = java_model.uid()

def copy(self, extra={}):
def copy(self, extra=None):
"""
Creates a copy of this instance with the same uid and some
extra params. This implementation first calls Params.copy and
Expand All @@ -175,6 +175,8 @@ def copy(self, extra={}):
:param extra: Extra parameters to copy to the new instance
:return: Copy of this instance
"""
if extra is None:
extra = dict()
that = super(JavaModel, self).copy(extra)
that._java_obj = self._java_obj.copy(self._empty_java_param_map())
that._transfer_params_to_java()
Expand Down

0 comments on commit 40a5eb2

Please sign in to comment.