File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -170,8 +170,7 @@ def iter_segments(self):
170170
171171 codes = self .codes
172172 len_vertices = len (vertices )
173- isnan = np .isnan
174- any = np .any
173+ isfinite = np .isfinite
175174
176175 NUM_VERTICES = self .NUM_VERTICES
177176 MOVETO = self .MOVETO
@@ -182,7 +181,7 @@ def iter_segments(self):
182181 if codes is None :
183182 next_code = MOVETO
184183 for v in vertices :
185- if any ( isnan (v )):
184+ if ( ~ isfinite (v )). any ( ):
186185 next_code = MOVETO
187186 else :
188187 yield v , next_code
@@ -200,7 +199,7 @@ def iter_segments(self):
200199 else :
201200 num_vertices = NUM_VERTICES [int (code )]
202201 curr_vertices = vertices [i :i + num_vertices ].flatten ()
203- if any ( isnan (curr_vertices )):
202+ if ( ~ isfinite (curr_vertices )). any ( ):
204203 was_nan = True
205204 elif was_nan :
206205 yield curr_vertices [- 2 :], MOVETO
You can’t perform that action at this time.
0 commit comments