def set_verts(self, verts, closed=True):
if closed:<EOL><INDENT>self._paths = []<EOL>for xy in verts:<EOL><INDENT>if np.ma.isMaskedArray(xy):<EOL><INDENT>if len(xy) and (xy[<NUM_LIT:0>] != xy[-<NUM_LIT:1>]).any():<EOL><INDENT>xy = np.ma.concatenate([xy, [xy[<NUM_LIT:0>]]])<EOL><DEDENT><DEDENT>else:<EOL><INDENT>xy = np.asarray(xy)<EOL>if len(xy) and (xy[<NUM_LIT:0>] != xy[-<NUM_LIT:1>]).any():<EOL><INDENT>xy = np.concatenate([xy, [xy[<NUM_LIT:0>]]])<EOL><DEDENT><DEDENT>self._paths.append(mpath.Path(xy))<EOL><DEDENT><DEDENT>else:<EOL><INDENT>self._paths = [mpath.Path(xy) for xy in verts]<EOL><DEDENT>
This allows one to delay initialization of the vertices.