@@ -331,11 +331,9 @@ def calc_label_rot_and_inline(self, slc, ind, lw, lc=None, spacing=5):
331331 # Check if closed and, if so, rotate contour so label is at edge
332332 closed = _is_closed_polygon (slc )
333333 if closed :
334- slc = np .r_ [slc [ind :- 1 ], slc [:ind + 1 ]]
335-
334+ slc = np .concatenate ([slc [ind :- 1 ], slc [:ind + 1 ]])
336335 if len (lc ): # Rotate lc also if not empty
337- lc = np .r_ [lc [ind :- 1 ], lc [:ind + 1 ]]
338-
336+ lc = np .concatenate ([lc [ind :- 1 ], lc [:ind + 1 ]])
339337 ind = 0
340338
341339 # Calculate path lengths
@@ -494,7 +492,7 @@ def add_label_near(self, x, y, inline=True, inline_spacing=5,
494492 # if there isn't a vertex close enough
495493 if not np .allclose (xcmin , lc [imin ]):
496494 # insert new data into the vertex list
497- lc = np .r_ [lc [:imin ], np . array ( xcmin )[ None , :], lc [imin :]]
495+ lc = np .row_stack ( [lc [:imin ], xcmin , lc [imin :]])
498496 # replace the path with the new one
499497 paths [segmin ] = mpath .Path (lc )
500498
@@ -568,7 +566,7 @@ def labels(self, inline, inline_spacing):
568566 # functions, this is not necessary and should probably be
569567 # eventually removed.
570568 if _is_closed_polygon (lc ):
571- slc = np .r_ [slc0 , slc0 [1 :2 , :]]
569+ slc = np .row_stack ( [slc0 , slc0 [1 :2 ]])
572570 else :
573571 slc = slc0
574572
0 commit comments