def make_path_regular(p):
 c = p.codes
 if (c is None):
  c = np.empty(p.vertices.shape[:1], u'i')
  c.fill(Path.LINETO)
  c[0] = Path.MOVETO
  return Path(p.vertices, c)
 else:
  return p

def make_path_regular ( p ) : c = p . codes if ( c is None ) : c = np . empty ( p . vertices . shape [ : 1 ] , u'i' ) c . fill ( Path . LINETO ) c [ 0 ] = Path . MOVETO return Path ( p . vertices , c ) else : return p
fill in the codes if none .