1616    You should have received a copy of the GNU General Public License 
1717    along with py-eddy-tracker.  If not, see <http://www.gnu.org/licenses/>. 
1818
19- Copyright (c) 2014-2015  by Evan Mason 
19+ Copyright (c) 2014-2017  by Evan Mason and Antoine Delepoulle  
20202121=========================================================================== 
2222
23+ observations.py 
2324
24- py_eddy_tracker_amplitude.py 
25- 
26- Version 2.0.3 
25+ Version 3.0.0 
2726
2827=========================================================================== 
2928
@@ -509,7 +508,7 @@ def solve_conflict(cost):
509508
510509    @staticmethod  
511510    def  solve_simultaneous (cost ):
512-         mask  =  - cost .mask 
511+         mask  =  ~ cost .mask 
513512        # Count number of link by self obs and other obs 
514513        self_links  =  mask .sum (axis = 1 )
515514        other_links  =  mask .sum (axis = 0 )
@@ -533,7 +532,7 @@ def solve_simultaneous(cost):
533532            # Cost to resolve conflict 
534533            cost_reduce  =  cost [i_self_keep ][:, i_other_keep ]
535534            shape  =  cost_reduce .shape 
536-             nb_conflict  =  (- cost_reduce .mask ).sum ()
535+             nb_conflict  =  (~ cost_reduce .mask ).sum ()
537536            logging .debug ('Shape conflict matrix : %s, %d conflicts' , shape , nb_conflict )
538537
539538            if  nb_conflict  >=  (shape [0 ] +  shape [1 ]):
@@ -637,7 +636,7 @@ def tracking(self, other):
637636            dist [mask_accept_dist ])
638637
639638        cost_mat  =  ma .empty (mask_accept_dist .shape , dtype = 'f4' )
640-         cost_mat .mask  =  - mask_accept_dist 
639+         cost_mat .mask  =  ~ mask_accept_dist 
641640        cost_mat [mask_accept_dist ] =  cost_values 
642641
643642        i_self , i_other  =  self .solve_function (cost_mat )
@@ -727,8 +726,8 @@ def filled_by_interpolation(self, mask):
727726            var  =  field [0 ]
728727            if  var  in  ['n' , 'virtual' , 'track' ] or  var  in  self .array_variables :
729728                continue 
730-             self .obs [var ][mask ] =  interp (index [mask ], index [- mask ],
731-                                          self .obs [var ][- mask ])
729+             self .obs [var ][mask ] =  interp (index [mask ], index [~ mask ],
730+                                          self .obs [var ][~ mask ])
732731
733732    def  extract_longer_eddies (self , nb_min , nb_obs , compress_id = True ):
734733        """Select eddies which are longer than nb_min 
0 commit comments