Returns a float, t, such that self.length(0, t) is approximately s.
        See the inv_arclength() docstring for more details.
767268
def ilength(self, s, s_tol=ILENGTH_S_TOL, maxits=ILENGTH_MAXITS,
                error=ILENGTH_ERROR, min_depth=ILENGTH_MIN_DEPTH):
        """"""
        return inv_arclength(self, s, s_tol=s_tol, maxits=maxits, error=error,
                             min_depth=min_depth)
181030
def length(self, error=ERROR, min_depth=MIN_DEPTH):
        """"""
        start_point = self.point(0)
        end_point = self.point(1)
        return segment_length(self, 0, 1, start_point, end_point, error, min_depth, 0)
179479
def cutoff(s, length=120):
    """"""
    if length < 5:
        raise ValueError('length must be >= 5')
    if len(s) <= length:
        return s
    else:
        i = (length - 2) / 2
        j = (length - 3) / 2
        return s[:i] + '...' + s[-j:]
1225184
def pad(a, desiredlength):
    

    if len(a) >= desiredlength:
        return a

    islist = isinstance(a, list)
    a = np.array(a)
    diff = desiredlength - len(a)
    shape = list(a.shape)
    shape[0] = diff

    padded = np.concatenate([a, np.zeros(shape, dtype=a.dtype)])
    return padded.tolist() if islist else padded
1370818
def _get_example_length(example):
  """"""
  length = tf.maximum(tf.shape(example[0])[0], tf.shape(example[1])[0])
  return length
563651
def get_size(self, value=None):
        
        if isinstance(value, type(self)):
            return value.get_size()

        return 2 + self.length
1254270
def getBottomLeft(self):
        
        return (float(self.get_cx()) - float(self.get_r()), float(self.get_cy()) - float(self.get_r()))
347283
def determineLength(length):
        
        integer = ord(length)

        if integer < 128:
            return 0
        elif integer < 192:
            return 1
        elif integer < 224:
            return 2
        elif integer < 240:
            return 3
        else:
            raise ConnectionError('Unknown controll byte {}'.format(length))
587906
def length(self):
        
        length = float(sum(i.length(self.vertices)
                           for i in self.entities))
        return length
1192948
def length(self, chain=-1):
        
        if chain is not None:
            return len(self._vlarrays[chain])
        else:
            return sum(map(len, self._vlarrays))
429922
def fit_size(min_length: int = 0, max_length: int = None,
             message=None) -> Filter_T:
    

    def validate(value):
        length = len(value) if value is not None else 0
        if length < min_length or \
                (max_length is not None and length > max_length):
            _raise_failure(message)
        return value

    return validate
388897
def length(self):
        """"""
        return math.sqrt((self.X * self.X) + (self.Y * self.Y))
659982
def length(self):
        
        return math.sqrt(
            (self.endpoint_a.northing - self.endpoint_b.northing) ** 2 +
            (self.endpoint_a.easting - self.endpoint_b.easting) ** 2
        )
664480
def determine_lengths(dtrajs):
    
    """
    if (isinstance(dtrajs[0], (int))):
        return len(dtrajs) * np.ones((1))
    lengths = np.zeros((len(dtrajs)))
    for i in range(len(dtrajs)):
        lengths[i] = len(dtrajs[i])
    return lengths
1003816
def transform_to_length(nndata, length):
        

        if length is None:
            return nndata

        if length:
            for cn in range(length):
                if cn not in nndata.cn_weights:
                    nndata.cn_weights[cn] = 0
                    nndata.cn_nninfo[cn] = []

        return nndata
21494
public int getLength()
  {
    int length = 0;
    
    for (TempCharBuffer ptr = _head; ptr != null; ptr = ptr._next) {
      length += ptr.getLength();
    }

    return length;
  }
794637
def bezier_curve_approx_len(P=[(0.0, 0.0)]):
    '''
    '''
    assert isinstance(P, list)
    assert len(P) > 0
    for p in P:
        assert isinstance(p, tuple)
        for i in p:
            assert len(p) > 1
            assert isinstance(i, float)
    
    n_seg = len(P) - 1
    pts = pts_on_bezier_curve(P, n_seg)
    return sum([distance_between_pts(pts[i], pts[i+1]) for i in range(n_seg)])