*Get an array of all of the trixels IDs that overlap the conesearch circles(s)*

        **Return:**
            - ``trixelArray`` -- an array of all the overlapping trixel ids
356864
def _get_trixel_ids_that_overlap_conesearch_circles(
            self):
        
        self.log.debug(
            'completed the ````_get_trixel_ids_that_overlap_conesearch_circles`` method')

        trixelArray = np.array([], dtype='int16', ndmin=1, copy=False)
        # FOR EACH RA, DEC SET IN THE NUMPY ARRAY, COLLECT THE OVERLAPPING HTM
        # TRIXELS
        r = self.radius / (60. * 60.)

        trixelArray = []

        trixelArray[:] = [self.mesh.intersect(
            ra1, dec1, r, inclusive=True, convertCoordinates=False) for ra1, dec1 in zip(self.ra, self.dec)]

        trixelArray = np.unique(np.concatenate(trixelArray))

        self.log.debug(
            'completed the ``_get_trixel_ids_that_overlap_conesearch_circles`` method')
        return trixelArray
307125
def findAllMatches(self, needle, similarity):
        
        positions = []
        # Use findBestMatch to get the best match
        while True:
            best_match = self.findBestMatch(needle, similarity)
            if best_match is None: # No more matches
                break
            # Found a match. Add it to our list
            positions.append(best_match) # (position, confidence)

            # Erase the found match from the haystack.
            # Repeat this process until no other matches are found
            x, y = best_match[0]
            w = needle.shape[1]
            h = needle.shape[0]
            roi = (x, y, w, h)
            # numpy 2D slice
            roi_slice = (slice(roi[1], roi[1]+roi[3]), slice(roi[0], roi[0]+roi[2]))
            self.haystack[roi_slice] = 0

        # Whew! Let's see if there's a match after all that.
        positions.sort(key=lambda x: (x[0][1], x[0][0]))
        return positions
706465
def overlaps(self, canvas, exclude=[]):
        
        try:
            exclude = list(exclude)
        except TypeError:
            exclude = [exclude]
        exclude.append(self)

        for selfY, row in enumerate(self.image.image()):
            for selfX, pixel in enumerate(row):
                canvasPixelOn = canvas.testPixel(
                    (selfX + self.position[0], selfY + self.position[1]),
                    excludedSprites=exclude
                )
                if pixel and canvasPixelOn:
                    return True
        return False
48414
public int[] getVertexPointIndices() {
        int[] indices = new int[numVertices];
        for (int i = 0; i < numVertices; i++) {
            indices[i] = vertexPointIndices[i];
        }
        return indices;
    }
330752
function intersectTriangle (out, pt, dir, tri) {
  var EPSILON = 0.000001
  var edge1 = [0, 0, 0]
  var edge2 = [0, 0, 0]
  var tvec = [0, 0, 0]
  var pvec = [0, 0, 0]
  var qvec = [0, 0, 0]

  vec3.subtract(edge1, tri[1], tri[0])
  vec3.subtract(edge2, tri[2], tri[0])

  vec3.cross(pvec, dir, edge2)
  var det = vec3.dot(edge1, pvec)

  if (det < EPSILON) return null
  vec3.subtract(tvec, pt, tri[0])
  var u = vec3.dot(tvec, pvec)
  if (u < 0 || u > det) return null
  vec3.cross(qvec, tvec, edge1)
  var v = vec3.dot(dir, qvec)
  if (v < 0 || u + v > det) return null

  var t = vec3.dot(edge2, qvec) / det
  out[0] = pt[0] + t * dir[0]
  out[1] = pt[1] + t * dir[1]
  out[2] = pt[2] + t * dir[2]
  return t
}
1248900
def get_color_stops(self):
        
        count = ffi.new('int *')
        _check_status(cairo.cairo_pattern_get_color_stop_count(
            self._pointer, count))
        stops = []
        stop = ffi.new('double[5]')
        for i in range(count[0]):
            _check_status(cairo.cairo_pattern_get_color_stop_rgba(
                self._pointer, i,
                stop + 0, stop + 1, stop + 2, stop + 3, stop + 4))
            stops.append(tuple(stop))
        return stops
408686
function getIndices(x, y) {
         if (this.indices.length === 0) {
           var points = this.points;
           var data = []; // flatten the points vector array

           for (var i = 0; i < points.length; i++) {
             // XXX Optimize me
             data.push(points[i].x);
             data.push(points[i].y);
           }

           this.indices = earcut_1(data);
         }

         return this.indices;
       }
1233779
private static int[] getStrides(int[] dims) {
        int rightmost = dims.length - 1;
        int[] strides = new int[dims.length];
        if (dims.length > 0) {          
            strides[rightmost] = 1;
            for (int i=rightmost-1; i >= 0; i--) {
                strides[i] = dims[i+1]*strides[i+1];
            }
        }
        return strides;
    }
781899
def identify_segments(self):
        

        i1 = np.sort([self._simplices[:,0], self._simplices[:,1]], axis=0)
        i2 = np.sort([self._simplices[:,0], self._simplices[:,2]], axis=0)
        i3 = np.sort([self._simplices[:,1], self._simplices[:,2]], axis=0)

        a = np.hstack([i1, i2, i3]).T

        # find unique rows in numpy array
        # <http://stackoverflow.com/questions/16970982/find-unique-rows-in-numpy-array>
        b = np.ascontiguousarray(a).view(np.dtype((np.void, a.dtype.itemsize * a.shape[1])))
        segments = np.unique(b).view(a.dtype).reshape(-1, a.shape[1])

        return self._deshuffle_simplices(segments)
667526
@Override
	public Point3d[] getVertices() {
		Point3d[] octahedron = new Point3d[6];
	    octahedron[0] = new Point3d(-cirumscribedRadius, 0, 0);
	    octahedron[1] = new Point3d( cirumscribedRadius, 0, 0);
	    octahedron[2] = new Point3d(0, -cirumscribedRadius, 0);
	    octahedron[3] = new Point3d(0,  cirumscribedRadius, 0);
	    octahedron[4] = new Point3d(0, 0, -cirumscribedRadius);
	    octahedron[5] = new Point3d(0, 0,  cirumscribedRadius);

		return octahedron;
	}
1269279
def get_xy_array(x_segment, y_segment):
    
    xy_array = []
    for num, x in enumerate(x_segment):
        xy_array.append((x, y_segment[num]))
    return xy_array
208316
def triu!(k=0)
      if ndim < 2
        raise NArray::ShapeError, "must be >= 2-dimensional array"
      end
      if contiguous?
        *shp,m,n = shape
        idx = tril_indices(k-1)
        reshape!(*shp,m*n)
        self[false,idx] = 0
        reshape!(*shp,m,n)
      else
        store(triu(k))
      end
    end
879782
def allconcat_ring(xs, devices, concat_axis):
  
  n = len(xs)
  if n == 1:
    return xs
  # [target, source]
  parts = [[xs[target] if target == source else None for source in xrange(n)]
           for target in xrange(n)]
  for distance in xrange(1, n // 2 + 1):
    for target in xrange(n):
      source = (target + distance) % n
      if parts[target][source] is None:
        with tf.device(devices[target]):
          parts[target][source] = tf.identity(parts[(target + 1) % n][source])
      source = (target - distance) % n
      if parts[target][source] is None:
        with tf.device(devices[target]):
          parts[target][source] = tf.identity(parts[(target - 1) % n][source])
  return mtf.parallel(devices, tf.concat, parts, axis=[concat_axis] * n)
1296173
public List<LabelledTriple> getTriples() {
        return triples.stream().map(this::labelTriple)
            .sorted(sortSubjects.thenComparing(sortPredicates).thenComparing(sortObjects)).collect(toList());
    }
777522
def check_color(c):
    

    c = asarray(c)
    if c.ndim == 1:
        c = c.flatten()
        c = c[newaxis, :]
        if c.shape[1] != 3:
            raise Exception("Color must have three values per point")
    elif c.ndim == 2:
        if c.shape[1] != 3:
            raise Exception("Color array must have three values per point")
    return c
946293
def __get_ra_index_indices(self):
        
        fragment_indices = []
        for idx, cumlen in enumerate(self._cumulative_lengths):
            cumlen_prev = self._cumulative_lengths[idx - 1] if idx > 0 else 0
            fragment_indices.append([np.argwhere(
                np.logical_and(self.ra_indices >= cumlen_prev, self.ra_indices < cumlen)
            )])
        return fragment_indices
619732
def _extract_array(self, kwargs_list):
        
        lens_model = self._lens_mode_list[0]
        if self._solver_type == 'CENTER':
            center_x = kwargs_list[0]['center_x']
            center_y = kwargs_list[0]['center_y']
            x = [center_x, center_y]
        elif self._solver_type == 'ELLIPSE':
            e1 = kwargs_list[0]['e1']
            e2 = kwargs_list[0]['e2']
            x = [e1, e2]
        elif self._solver_type == 'SHAPELETS':
            coeffs = list(kwargs_list[0]['coeffs'])
            [c10, c01] = coeffs[1: 3]
            x = [c10, c01]
        elif self._solver_type == 'THETA_E_PHI':
            theta_E = kwargs_list[0]['theta_E']
            e1 = kwargs_list[1]['e1']
            e2 = kwargs_list[1]['e2']
            phi_ext, gamma_ext = param_util.ellipticity2phi_gamma(e1, e2)
            x = [theta_E, phi_ext]
        else:
            raise ValueError("Solver type %s not supported for 2-point solver!" % self._solver_type)
        return x