Combine multiple Point tags into an array.
971618
def combine_xml_points(l, units, handle_units):
    """"""
    ret = {}
    for item in l:
        for key, value in item.items():
            ret.setdefault(key, []).append(value)

    for key, value in ret.items():
        if key != 'date':
            ret[key] = handle_units(value, units.get(key, None))

    return ret
351661
function parseTags(tags) {
    if (tags.length > 0 && util.isArray(tags[0])) {
        tags = tags[0];
    }

    return tags;
}
1209454
def tag_array(events):
    
    all_tags = sorted(set(tag for event in events for tag in event.tags))
    array = np.zeros((len(events), len(all_tags)))
    for row, event in enumerate(events):
        for tag in event.tags:
            array[row, all_tags.index(tag)] = 1
    return array
1051430
def operate_multi(self, points):
        
        points = np.array(points)
        affine_points = np.concatenate(
            [points, np.ones(points.shape[:-1] + (1,))], axis=-1)
        return np.inner(affine_points, self.affine_matrix)[..., :-1]
126191
function(points, bbox) {
        var result = [];
        for (var i = 0; i < points.length; i++) {
            var point = points[i];
            if (this.bboxContainsPoint(point, bbox)) {
                result.push(point);
            }
        }
        return result;
    }
290309
function mergeBy (getItemOrder, arrays) {
    var
      n = reduce(add, 0, map(getLength, arrays)),
      result = new Array(n),
      fingerArrays = map(mkFingerArray, arrays),

      i, min;

    for (i = 0; i < n; i++) {
      min = minBy(getItemOrder, fingerArrays);

      result[i] = getPointedFinger(min);
      min.pointer += 1;
    }

    return result;
  }
1358302
function aabbToPoints(points, box) {
  vec4set4(points[0], box[0][0], box[0][1], box[0][2], 1)
  vec4set4(points[1], box[1][0], box[0][1], box[0][2], 1)
  vec4set4(points[2], box[1][0], box[0][1], box[1][2], 1)
  vec4set4(points[3], box[0][0], box[0][1], box[1][2], 1)
  vec4set4(points[4], box[0][0], box[1][1], box[0][2], 1)
  vec4set4(points[5], box[1][0], box[1][1], box[0][2], 1)
  vec4set4(points[6], box[1][0], box[1][1], box[1][2], 1)
  vec4set4(points[7], box[0][0], box[1][1], box[1][2], 1)
  return points
}
1114791
def wf_point_tags?(tags)
      raise Wavefront::Exception::InvalidTag unless tags.is_a?(Hash)
      tags.each { |k, v| wf_point_tag?(k, v) }
    end
862065
def _multi(fun, lons, lats, chunk_size, cores=1):
    
    pool = Pool(processes=cores)

    splits = get_scene_splits(lons.shape[0], chunk_size, cores)

    lons_parts = np.vsplit(lons, splits)
    lats_parts = np.vsplit(lats, splits)

    results = [pool.apply_async(fun,
                                (lons_parts[i],
                                 lats_parts[i]))
               for i in range(len(lons_parts))]

    pool.close()
    pool.join()

    lons, lats = zip(*(res.get() for res in results))

    return np.vstack(lons), np.vstack(lats)
90905
private MultiPoint asMultiPoint(List<List> coords, CrsId crsId) throws IOException {
        if (coords == null || coords.isEmpty()) {
            throw new IOException("A multipoint contains at least one point");
        }
        Point[] points = new Point[coords.size()];
        for (int i = 0; i < coords.size(); i++) {
            points[i] = asPoint(coords.get(i), crsId);
        }
        return new MultiPoint(points);
    }
572974
function nodesToArray(nodes) {
    if (!nodes || nodes.length === 0) {
        return false;
    } else {
        return nodes.length ? [].slice.call(nodes) : [nodes];
    }
}
895990
private Shape[] combine(Shape target, Shape other, boolean subtract) {
		if (subtract) {
			ArrayList shapes = new ArrayList();
			ArrayList used = new ArrayList();
			
			// remove any points that are contianed in the shape we're removing, these
			// are implicitly used
			for (int i=0;i<target.getPointCount();i++) {
				float[] point = target.getPoint(i);
				if (other.contains(point[0], point[1])) {
					used.add(new Vector2f(point[0], point[1]));
					if (listener != null) {
						listener.pointExcluded(point[0], point[1]);
					}
				}
			}

			for (int i=0;i<target.getPointCount();i++) {
				float[] point = target.getPoint(i);
				Vector2f pt = new Vector2f(point[0], point[1]);
				
				if (!used.contains(pt)) {
					Shape result = combineSingle(target, other, true, i);
					shapes.add(result);
					for (int j=0;j<result.getPointCount();j++) {
						float[] kpoint = result.getPoint(j);
						Vector2f kpt = new Vector2f(kpoint[0], kpoint[1]);
						used.add(kpt);
					}
				}
			}
			
			return (Shape[]) shapes.toArray(new Shape[0]);
		} else {
			for (int i=0;i<target.getPointCount();i++) {
				if (!other.contains(target.getPoint(i)[0], target.getPoint(i)[1])) {
					if (!other.hasVertex(target.getPoint(i)[0], target.getPoint(i)[1])) {
						Shape shape = combineSingle(target, other, false, i);
						return new Shape[] {shape};
					}
				}
			}
			
			return new Shape[] {other};
		}
	}
158804
function pointsArray (buf, offset, numPoints) {
    var pointsData = []
    for (var i = offset; i < offset + numPoints * 12; i += 12) {
      pointsData.push([buf.readFloatLE(i + 0), buf.readFloatLE(i + 4), buf.readFloatLE(i + 8)])
    }
    return pointsData
  }
642289
def combine_nt_lists(lists, flds, dflt_null=""):
    """"""
    combined_nt_list = []
    # Check that all lists are the same length
    lens = [len(lst) for lst in lists]
    assert len(set(lens)) == 1, \
        "LIST LENGTHS MUST BE EQUAL: {Ls}".format(Ls=" ".join(str(l) for l in lens))
    # 1. Instantiate namedtuple object
    ntobj = cx.namedtuple("Nt", " ".join(flds))
    # 2. Loop through zipped list
    for lst0_lstn in zip(*lists):
        # 2a. Combine various namedtuples into a single namedtuple
        combined_nt_list.append(ntobj._make(_combine_nt_vals(lst0_lstn, flds, dflt_null)))
    return combined_nt_list
611302
function parsePoints(points) {
    var coord = this._coord;
    var rst = [];
    Util.each(points, function (point) {
      rst.push(coord.convertPoint(point));
    });
    return rst;
  }
1267689
function pointsToCoordArray(points) {
                var coodinatesArray = new Array(points.length * points[0].length);
                var k = 0;
                for (var i = 0; i < points.length; ++i) {
                    for (var j = 0; j < points[0].length; ++j) {
                        coodinatesArray[k] = points[i][j];
                        ++k;
                    }
                }

                return coodinatesArray;
            }
1017034
function groupTags(tags, key) {
    var groupBy = 'data-combo';
    return tags.reduce(function (previous, current) {
        var combineName = current.attributes[groupBy];
        var keyValue = current.attributes[key];

        if (!keyValue || !combineName) {
            return previous;
        }

        var group = previous[combineName];

        if (!group) {
            group = previous[combineName] = [];
        }

        delete current.attributes[groupBy];
        group.push(current);

        return previous;
    }, {});
}