<commit_before>import numpy as np
from blmath.util.decorators import setter_property

class Polyline(object):
    '''
    Represent the geometry of a polygonal chain in 3-space. The
    chain may be open or closed, and there are no constraints on the
    geometry. For example, the chain may be simple or
    self-intersecting, and the points need not be unique.

    Mutable by setting polyline.v or polyline.closed or calling
    a method like polyline.partition_by_length().

    This replaces the functions in blmath.geometry.segment.

    Note this class is distinct from lace.lines.Lines, which
    allows arbitrary edges and enables visualization. To convert to
    a Lines object, use the as_lines() method.

    '''
    def __init__(self, v, closed=False):
        '''
        v: An array-like thing containing points in 3-space.
        closed: True indicates a closed chain, which has an extra
          segment connecting the last point back to the first
          point.

        '''
        # Avoid invoking _update_edges before setting closed and v.
        self.__dict__['closed'] = closed
        self.v = v

    def copy(self):
        '''
        Return a copy of this polyline.

        '''
        v = None if self.v is None else np.copy(self.v)
        return self.__class__(v, closed=self.closed)

    def as_lines(self):
        '''
        Return a Lines instance with our vertices and edges.

        '''
        from bodylabs.mesh.lines import Lines<commit_msg>Change Lines import to lace<commit_after>import numpy as np
from blmath.util.decorators import setter_property

class Polyline(object):
    '''
    Represent the geometry of a polygonal chain in 3-space. The
    chain may be open or closed, and there are no constraints on the
    geometry. For example, the chain may be simple or
    self-intersecting, and the points need not be unique.

    Mutable by setting polyline.v or polyline.closed or calling
    a method like polyline.partition_by_length().

    This replaces the functions in blmath.geometry.segment.

    Note this class is distinct from lace.lines.Lines, which
    allows arbitrary edges and enables visualization. To convert to
    a Lines object, use the as_lines() method.

    '''
    def __init__(self, v, closed=False):
        '''
        v: An array-like thing containing points in 3-space.
        closed: True indicates a closed chain, which has an extra
          segment connecting the last point back to the first
          point.

        '''
        # Avoid invoking _update_edges before setting closed and v.
        self.__dict__['closed'] = closed
        self.v = v

    def copy(self):
        '''
        Return a copy of this polyline.

        '''
        v = None if self.v is None else np.copy(self.v)
        return self.__class__(v, closed=self.closed)

    def as_lines(self):
        '''
        Return a Lines instance with our vertices and edges.

        '''
        from lace.lines import Lines
{'fraction_non_alphanumeric': 0.0680979537068098, 'fraction_numerical': 0.0013418316001341832, 'mean_word_length': 2.4275862068965517, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5380384', 'n_tokens_mistral': 806, 'n_tokens_neox': 762, 'n_words': 343}