File tree 2 files changed +1
-14
lines changed
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):
657
657
self .tell_many (* zip (* data .items ()))
658
658
659
659
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
-
672
660
def loss_manager (x_scale ):
673
661
def sort_key (ival , loss ):
674
662
loss , ival = finite_loss (ival , loss , x_scale )
675
663
return - loss , ival
676
664
sorted_dict = sortedcollections .ItemSortedDict (sort_key )
677
- _fix_deepcopy (sorted_dict , x_scale )
678
665
return sorted_dict
679
666
680
667
Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ def get_version_and_cmdclass(package_name):
26
26
27
27
install_requires = [
28
28
'scipy' ,
29
- 'sortedcollections' ,
29
+ 'sortedcollections >= 1.1 ' ,
30
30
'sortedcontainers >= 2.0' ,
31
31
]
32
32
You can’t perform that action at this time.
0 commit comments