Return unordered array with all the points in this neurite
193327
def points(self):
        ''''''
        # add all points in a section except the first one, which is a duplicate
        _pts = [v for s in self.root_node.ipreorder()
                for v in s.points[1:, COLS.XYZR]]
        # except for the very first point, which is not a duplicate
        _pts.insert(0, self.root_node.points[0][COLS.XYZR])
        return np.array(_pts)
570647
public Point[] points() {
        Point[] points = new Point[width * height];
        int k = 0;
        for (int y = 0; y < height; y++) {
            for (int x = 0; x < width; x++) {
                points[k++] = new Point(x, y);
            }
        }
        return points;
    }
771048
def get_sets_index(self):
        
        index = []
        for i, place in enumerate(self):
            index.append(np.ones(place.set_of_points.shape[0])*i)
        return np.concatenate(index).astype(int)
1017052
def points(self):
        
        points = matrix_to_points(matrix=self.matrix,
                                  pitch=self.pitch,
                                  origin=self.origin)
        return points
1249805
public function toArray() : array
   {

      return [
         'x'      => $this->point->x,
         'y'      => $this->point->y,
         'width'  => $this->size->width,
         'height' => $this->size->height
      ];

   }
898303
def has_all_finite_radius_neurites(data_wrapper, threshold=0.0):
    '''
    '''
    db = data_wrapper.data_block
    neurite_ids = np.in1d(db[:, COLS.TYPE], POINT_TYPE.NEURITES)
    zero_radius_ids = db[:, COLS.R] <= threshold
    bad_pts = np.array(db[neurite_ids & zero_radius_ids][:, COLS.ID],
                       dtype=int).tolist()
    return CheckResult(len(bad_pts) == 0, bad_pts)
702721
def partition_asymmetries(neurites, neurite_type=NeuriteType.all):
    ''''''
    return map(_bifurcationfunc.partition_asymmetry,
               iter_sections(neurites,
                             iterator_type=Tree.ibifurcation_point,
                             neurite_filter=is_type(neurite_type)))
1015909
def _interval_to_bound_points(array):
    

    array_boundaries = np.array([x.left for x in array])
    array_boundaries = np.concatenate(
        (array_boundaries, np.array([array[-1].right])))

    return array_boundaries
240296
def n_leaves(neurites, neurite_type=NeuriteType.all):
    ''''''
    return n_sections(neurites, neurite_type=neurite_type, iterator_type=Tree.ileaf)
1121303
def _list2array(lst):
    """"""

    if lst and isinstance(lst[0], cp.ndarray):
        return cp.hstack(lst)
    else:
        return cp.asarray(lst)
1160467
def array(self):
        
        if self._ind < self.shape:
            return self._values[:self._ind]
        if not self._cached:
            ind = int(self._ind % self.shape)
            self._cache[:self.shape - ind] = self._values[ind:]
            self._cache[self.shape - ind:] = self._values[:ind]
            self._cached = True
        return self._cache
100792
def soma_points(self):
        ''''''
        db = self.data_block
        return db[db[:, COLS.TYPE] == POINT_TYPE.SOMA]
1212322
def __get_all_lowpoints(dfs_data):
    """"""
    lowpoint_1_lookup = {}
    lowpoint_2_lookup = {}

    ordering = dfs_data['ordering']

    for node in ordering:
        low_1, low_2 = __get_lowpoints(node, dfs_data)
        lowpoint_1_lookup[node] = low_1
        lowpoint_2_lookup[node] = low_2

    return lowpoint_1_lookup, lowpoint_2_lookup
1310259
def points_in_each_seg(path, tvals):
    """"""
    A = np.array([[-1,  3, -3,  1], # transforms cubic bez to standard poly
                  [ 3, -6,  3,  0],
                  [-3,  3,  0,  0],
                  [ 1,  0,  0,  0]])
    B = [seg.bpoints() for seg in path]
    return np.dot(B, np.dot(A, np.power(tvals, [[3],[2],[1],[0]])))
1198113
def segment_midpoints(neurites, neurite_type=NeuriteType.all):
    ''''''
    def _seg_midpoint(sec):
        '''Return the mid-points of segments in a section'''
        pts = sec.points[:, COLS.XYZ]
        return np.divide(np.add(pts[:-1], pts[1:]), 2.0)

    return map_segments(_seg_midpoint, neurites, neurite_type)
937911
def point_array(point)
      [point[:path] || raise,
       point[:value] || raise,
       point.fetch(:ts, nil),
       point.fetch(:source, HOSTNAME),
       point[:tags]&.to_wf_tag,
       opts[:tags]&.to_wf_tag]
    end
249145
def map_sections(fun, neurites, neurite_type=NeuriteType.all, iterator_type=Tree.ipreorder):
    ''''''
    return map(fun, iter_sections(neurites,
                                  iterator_type=iterator_type,
                                  neurite_filter=is_type(neurite_type)))