Returns lists of houses and angles.
165901
def sweHouses(jd, lat, lon, hsys):
    
    hsys = SWE_HOUSESYS[hsys]
    hlist, ascmc = swisseph.houses(jd, lat, lon, hsys)
    # Add first house to the end of 'hlist' so that we
    # can compute house sizes with an iterator 
    hlist += (hlist[0],)
    houses = [
        {
            'id': const.LIST_HOUSES[i],
            'lon': hlist[i], 
            'size': angle.distance(hlist[i], hlist[i+1])
        } for i in range(12)
    ]
    angles = [
        {'id': const.ASC, 'lon': ascmc[0]}, 
        {'id': const.MC, 'lon': ascmc[1]},
        {'id': const.DESC, 'lon': angle.norm(ascmc[0] + 180)},
        {'id': const.IC, 'lon': angle.norm(ascmc[1] + 180)}
    ]
    return (houses, angles)
1030981
public List<Point> getMazePoints() {
        List<Point> points = new ArrayList<Point>();
        for (int row = 0; row < this.rows; row++) {
            for (int column = 0; column < this.columns; column++) {
                points.add(new Point(column, row));
            }
        }
        return points;
    }
794759
private List<Coordinate> getCoordinates(List<Geometry> geometries) {
		List<Coordinate> coordinates = new ArrayList<Coordinate>();
		for (Geometry geometry : geometries) {
			Coordinate[] geometryCoordinates = geometry.getCoordinates();
			for (int i = 0; i < geometryCoordinates.length; i++) {
				coordinates.add(geometryCoordinates[i]);
			}
		}
		return coordinates;
	}
912014
def get(self):
        
        return {k:v for k,v in list(self.options.items()) if k in self._allowed_axes}
286727
def get_lonlats(self):
        """"""
        longitudes = self.get_sds_variable('Longitude')
        latitudes = self.get_sds_variable('Latitude')
        return longitudes, latitudes
1103607
def as_list(self):
        """"""
        return [self.name, self.value, [x.as_list for x in self.children]]
1211773
def scalarcoords(self):
        """"""
        return {k: v.values for k, v in self.coords.items() if v.dims==()}
18990
def properties(self):  # type: () -> list
        

        _type = type(self)
        return [_property for _property in dir(_type) if self._is_property(_property)]
327090
private int getNeighbours( int[] src1d, int i, int ox, int oy, int d_w, int d_h ) {
        int x, y, result;

        x = (i % d_w) + ox; // d_w and d_h are assumed to be set to the
        y = (i / d_w) + oy; // width and height of scr1d

        if ((x < 0) || (x >= d_w) || (y < 0) || (y >= d_h)) {
            result = 0;
        } else {
            result = src1d[y * d_w + x] & 0x000000ff;
        }
        return result;
    }
854645
def axes(self):
        """"""
        return tuple(i for i in range(self.domain.ndim)
                     if self.domain.shape[i] != self.range.shape[i])
106372
def getCoords(self):
        '''
        
        '''

        if DEBUG_COORDS:
            print >>sys.stderr, "getCoords(%s %s ## %s)" % (self.getClass(), self.getId(), self.getUniqueId())

        (x, y) = self.getXY();
        w = self.getWidth()
        h = self.getHeight()
        return ((x, y), (x+w, y+h))
1002750
def shapeRecords(self):
        """"""
        return ShapeRecords([ShapeRecord(shape=rec[0], record=rec[1]) \
                                for rec in zip(self.shapes(), self.records())])
1367478
def shapes(self):
    """"""
    # Todo: Cache?
    if self._shapes:
      return self._shapes
    # Group together by shape_id
    self.log("Generating shapes...")
    ret = collections.defaultdict(entities.ShapeLine)
    for point in self.read('shapes'):
      ret[point['shape_id']].add_child(point)
    self._shapes = ret
    return self._shapes
170058
def xy_positions(self):
        """"""
        if self._xy_positions is None or len(self._xy_positions) == 0:
            xy_pos = []
            for dom_id, pos in self.dom_positions.items():
                if self.domid2floor(dom_id) == 1:
                    xy_pos.append(np.array([pos[0], pos[1]]))
            self._xy_positions = np.array(xy_pos)
        return self._xy_positions
215292
def elevations(self):
        
        resources = self.get_resource()
        elevations = namedtuple('elevations_data', 'elevations')
        try:
            return [elevations(resource['elevations'])
                    for resource in resources]
        except KeyError:
            return [elevations(resource['offsets'])
                    for resource in resources]
        except TypeError:
            try:
                if isinstance(resources['ElevationData']['Elevations'], dict):
                    return elevations(resources['ElevationData']['Elevations'])
            except KeyError:
                offsets = namedtuple('offsets_data', 'offsets')
                try:
                    if isinstance(resources['SeaLevelData']['Offsets'], dict):
                        return offsets(resources['SeaLevelData']['Offsets'])
                except KeyError:
                    print(KeyError)
1041467
def aspectBenefics(self):
        
        benefics = [const.VENUS, const.JUPITER]
        return self.__aspectLists(benefics, aspList=[0, 60, 120])
867083
def asList(self):
        
        base = [self._x, self._y]
        if not self._z is None:
            base.append(self._z)
        elif not self._m is None:
            base.append(self._m)
        return base