File tree Expand file tree Collapse file tree 2 files changed +1
-14
lines changed Expand file tree Collapse file tree 2 files changed +1
-14
lines changed Original file line number Diff line number Diff line change @@ -657,24 +657,11 @@ def _set_data(self, data):
657657 self .tell_many (* zip (* data .items ()))
658658
659659
660- def _fix_deepcopy (sorted_dict , x_scale ):
661- # XXX: until https://github.com/grantjenks/sortedcollections/issues/5 is fixed
662- import types
663- def __deepcopy__ (self , memo ):
664- items = deepcopy (list (self .items ()))
665- lm = loss_manager (self .x_scale )
666- lm .update (items )
667- return lm
668- sorted_dict .x_scale = x_scale
669- sorted_dict .__deepcopy__ = types .MethodType (__deepcopy__ , sorted_dict )
670-
671-
672660def loss_manager (x_scale ):
673661 def sort_key (ival , loss ):
674662 loss , ival = finite_loss (ival , loss , x_scale )
675663 return - loss , ival
676664 sorted_dict = sortedcollections .ItemSortedDict (sort_key )
677- _fix_deepcopy (sorted_dict , x_scale )
678665 return sorted_dict
679666
680667
Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ def get_version_and_cmdclass(package_name):
2626
2727install_requires = [
2828 'scipy' ,
29- 'sortedcollections' ,
29+ 'sortedcollections >= 1.1 ' ,
3030 'sortedcontainers >= 2.0' ,
3131]
3232
You can’t perform that action at this time.
0 commit comments