repo_id
stringlengths
21
96
file_path
stringlengths
31
155
content
stringlengths
1
92.9M
__index_level_0__
int64
0
0
rapidsai_public_repos/gpu-bdb/gpu_bdb
rapidsai_public_repos/gpu-bdb/gpu_bdb/benchmark_runner/benchmark_config.yaml
# benchmark config yaml ### Please fill these accordingly data_dir: output_dir: file_format: parquet output_filetype: parquet split_row_groups: False repartition_small_table: True benchmark_runner_include_sql: backend: GPU scheduler_file_path: dask_profile: False verify_results: False verify_dir: sheet: tab: get_rea...
0
rapidsai_public_repos/gpu-bdb/gpu_bdb
rapidsai_public_repos/gpu-bdb/gpu_bdb/benchmark_runner/__init__.py
# Copyright (c) 2020, NVIDIA CORPORATION.
0
rapidsai_public_repos/gpu-bdb/gpu_bdb/benchmark_runner
rapidsai_public_repos/gpu-bdb/gpu_bdb/benchmark_runner/slurm/run_bench.sh
#!/bin/bash set -e pipefail ######################################################### ### Core Benchmark Configuration ### ######################################################### export DATA_DIRECTORY="" export OUTPUT_DIRECTORY="" export GOOGLE_SPREADSHEET_NAME="GPU-BDB" export GOOGLE_SPREADSHEET_TAB="SF1K TCP Runs"...
0
rapidsai_public_repos/gpu-bdb/gpu_bdb/benchmark_runner
rapidsai_public_repos/gpu-bdb/gpu_bdb/benchmark_runner/slurm/run.sh
#!/bin/bash ACCOUNT=rapids PARTITION=backfill NODES=1 GPUS_PER_NODE=16 export NUM_WORKERS=$((NODES*GPUS_PER_NODE)) DATA_PATH="/lustre/fsw/rapids" MOUNT_PATH="/gpu-bdb-data/" IMAGE=${IMAGE:-/lustre/fsw/rapids/gpu-bdb/containers/gpu-bdb-20210421.sqsh} RUN_BENCH_PATH=${RUN_BENCH_PATH:-$HOME/gpu-bdb/gpu_bdb/benchmark_run...
0
rapidsai_public_repos/gpu-bdb/gpu_bdb/benchmark_runner
rapidsai_public_repos/gpu-bdb/gpu_bdb/benchmark_runner/slurm/Dockerfile
ARG CUDA_VER=11.2.0 ARG LINUX_VER=ubuntu18.04 FROM nvidia/cuda:${CUDA_VER}-devel-${LINUX_VER} RUN apt update -y && apt-get --fix-missing upgrade -y && apt install -y git ADD https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh /miniconda.sh RUN bash /miniconda.sh -b -p /opt/conda ENV GCC_VERSION=9...
0
rapidsai_public_repos/gpu-bdb/gpu_bdb/benchmark_runner
rapidsai_public_repos/gpu-bdb/gpu_bdb/benchmark_runner/slurm/rapids-gpu-bdb-cuda11.2.yml
channels: - rapidsai-nightly - nvidia - conda-forge dependencies: - python=3.8 - cudatoolkit=11.2 - cudf - rmm - dask-cuda - dask-cudf - cuml - dask - distributed - scipy - scikit-learn - spacy=2.3 - oauth2client - asyncssh - psutil - ipykernel - jupyterlab - gspread - oauth...
0
rapidsai_public_repos
rapidsai_public_repos/cuspatial/.pre-commit-config.yaml
# Copyright (c) 2019-2023, NVIDIA CORPORATION. repos: - repo: https://github.com/PyCQA/isort rev: 5.12.0 hooks: - id: isort # Use the config file specific to each subproject so that each # project can specify its own first/third-party packages. ...
0
rapidsai_public_repos
rapidsai_public_repos/cuspatial/pyproject.toml
[tool.black] line-length = 79 target-version = ["py39"] include = '\.py?$' force-exclude = ''' /( thirdparty | \.eggs | \.git | \.hg | \.mypy_cache | \.tox | \.venv | _build | buck-out | build | dist )/ ''' [tool.codespell] # note: pre-commit passes explicit lists of files h...
0
rapidsai_public_repos
rapidsai_public_repos/cuspatial/.flake8
# Copyright (c) 2019-2023, NVIDIA CORPORATION. [flake8] filename = *.py, *.pyx, *.pxd, *.pxi exclude = __init__.py, *.egg, build, docs, .git force-check = True ignore = # line break before binary operator W503, # whitespace before : E203 per-file-ignores = # Rules ignored only in Cython: # E211...
0
rapidsai_public_repos
rapidsai_public_repos/cuspatial/fetch_rapids.cmake
# ============================================================================= # Copyright (c) 2018-2022, NVIDIA CORPORATION. # # Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except # in compliance with the License. You may obtain a copy of the License at # # http://www.apa...
0
rapidsai_public_repos
rapidsai_public_repos/cuspatial/README.md
# <div align="left"><img src="https://rapids.ai/assets/images/rapids_logo.png" width="90px"/>&nbsp;cuSpatial - GPU-Accelerated Vector Geospatial Data Analysis</div> > **Note** > > cuSpatial depends on [cuDF](https://github.com/rapidsai/cudf) and [RMM](https://github.com/rapidsai/rmm) from [RAPIDS](https://rapids.ai/)....
0
rapidsai_public_repos
rapidsai_public_repos/cuspatial/CHANGELOG.md
# cuSpatial 23.10.00 (11 Oct 2023) ## 🚨 Breaking Changes - Update to Cython 3.0.0 ([#1235](https://github.com/rapidsai/cuspatial/pull/1235)) [@vyasr](https://github.com/vyasr) ## πŸ› Bug Fixes - Add `curl` for notebook testing ([#1281](https://github.com/rapidsai/cuspatial/pull/1281)) [@raydouglass](https://github....
0
rapidsai_public_repos
rapidsai_public_repos/cuspatial/build.sh
#!/bin/bash # Copyright (c) 2019, NVIDIA CORPORATION. # cuSpatial build script # This script is used to build the component(s) in this repo from # source, and can be called with various options to customize the # build as needed (see the help output for details) # Abort script on first error set -e NUMARGS=$# ARGS...
0
rapidsai_public_repos
rapidsai_public_repos/cuspatial/dependencies.yaml
# Dependency list for https://github.com/rapidsai/dependency-file-generator files: all: output: conda matrix: cuda: ["11.8", "12.0"] arch: [x86_64] includes: - build_cpp - build_python - cudatoolkit - develop - docs - py_version - depends_on_rmm ...
0
rapidsai_public_repos
rapidsai_public_repos/cuspatial/CONTRIBUTING.md
# Contributing to cuSpatial See [cuspatial contributing guide](https://docs.rapids.ai/api/cuspatial/nightly/developer_guide/contributing_guide.html)
0
rapidsai_public_repos
rapidsai_public_repos/cuspatial/LICENSE
Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, ...
0
rapidsai_public_repos
rapidsai_public_repos/cuspatial/VERSION
23.12.00
0
rapidsai_public_repos
rapidsai_public_repos/cuspatial/print_env.sh
#!/usr/bin/env bash # Copyright (c) 2022, NVIDIA CORPORATION. # Reports relevant environment information useful for diagnosing and # debugging cuSpatial issues. # Usage: # "./print_env.sh" - prints to stdout # "./print_env.sh > env.txt" - prints to file "env.txt" print_env() { echo "**git***" if [ "$(git rev-parse --i...
0
rapidsai_public_repos/cuspatial/python
rapidsai_public_repos/cuspatial/python/cuproj/pyproject.toml
# Copyright (c) 2022-2023, NVIDIA CORPORATION. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agre...
0
rapidsai_public_repos/cuspatial/python
rapidsai_public_repos/cuspatial/python/cuproj/CMakeLists.txt
# ============================================================================= # Copyright (c) 2023, NVIDIA CORPORATION. # # Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except # in compliance with the License. You may obtain a copy of the License at # # http://www.apache.o...
0
rapidsai_public_repos/cuspatial/python
rapidsai_public_repos/cuspatial/python/cuproj/README.md
# <div align="left"><img src="https://rapids.ai/assets/images/rapids_logo.png" width="90px"/>&nbsp;cuProj: GPU-Accelerated Coordinate Projection</div> > **Note** > > cuProj depends on [RMM](https://github.com/rapidsai/rmm) from [RAPIDS](https://rapids.ai/). ## Resources - [cuProj User's Guide](https://docs.rapids.ai...
0
rapidsai_public_repos/cuspatial/python
rapidsai_public_repos/cuspatial/python/cuproj/setup.py
# Copyright (c) 2018-2023, NVIDIA CORPORATION. from setuptools import find_packages from skbuild import setup packages = find_packages(include=["cuproj*"]) setup( packages=packages, package_data={ key: ["VERSION", "*.pxd", "*.hpp", "*.cuh"] for key in packages }, zip_safe=False, )
0
rapidsai_public_repos/cuspatial/python
rapidsai_public_repos/cuspatial/python/cuproj/LICENSE
Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, ...
0
rapidsai_public_repos/cuspatial/python
rapidsai_public_repos/cuspatial/python/cuproj/.coveragerc
# Configuration file for Python coverage tests [run] source = cuproj
0
rapidsai_public_repos/cuspatial/python/cuproj
rapidsai_public_repos/cuspatial/python/cuproj/cuproj/transformer.py
import cupy as cp from cuproj._lib.transform import Transformer as _Transformer class Transformer: """A transformer object to transform coordinates from one CRS to another. Notes ----- Currently only the EPSG authority is supported. Currently only projection from WGS84 to UTM (and vice versa) ...
0
rapidsai_public_repos/cuspatial/python/cuproj
rapidsai_public_repos/cuspatial/python/cuproj/cuproj/_version.py
# Copyright (c) 2023, NVIDIA CORPORATION. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to...
0
rapidsai_public_repos/cuspatial/python/cuproj
rapidsai_public_repos/cuspatial/python/cuproj/cuproj/__init__.py
# Copyright (c) 2023, NVIDIA CORPORATION. from ._version import __git_commit__, __version__ from .transformer import Transformer
0
rapidsai_public_repos/cuspatial/python/cuproj
rapidsai_public_repos/cuspatial/python/cuproj/cuproj/VERSION
23.12.00
0
rapidsai_public_repos/cuspatial/python/cuproj/cuproj
rapidsai_public_repos/cuspatial/python/cuproj/cuproj/cuprojshim/CMakeLists.txt
# ============================================================================= # Copyright (c) 2023, NVIDIA CORPORATION. # # Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except # in compliance with the License. You may obtain a copy of the License at # # http://www.apache.o...
0
rapidsai_public_repos/cuspatial/python/cuproj/cuproj/cuprojshim
rapidsai_public_repos/cuspatial/python/cuproj/cuproj/cuprojshim/include/cuprojshim.hpp
/* * Copyright (c) 2023, NVIDIA CORPORATION. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law ...
0
rapidsai_public_repos/cuspatial/python/cuproj/cuproj/cuprojshim/include
rapidsai_public_repos/cuspatial/python/cuproj/cuproj/cuprojshim/include/detail/cuprojshim.hpp
/* * Copyright (c) 2023, NVIDIA CORPORATION. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law ...
0
rapidsai_public_repos/cuspatial/python/cuproj/cuproj/cuprojshim
rapidsai_public_repos/cuspatial/python/cuproj/cuproj/cuprojshim/src/cuprojshim.cu
/* * Copyright (c) 2023, NVIDIA CORPORATION. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law ...
0
rapidsai_public_repos/cuspatial/python/cuproj/cuproj
rapidsai_public_repos/cuspatial/python/cuproj/cuproj/tests/test_transform.py
import cupy as cp import geopandas as gpd import numpy as np import pytest from cupy.testing import assert_allclose from pyproj import Transformer from pyproj.enums import TransformDirection from shapely.geometry import Point import cuspatial from cuproj import Transformer as cuTransformer valid_crs_combos = [ (...
0
rapidsai_public_repos/cuspatial/python/cuproj/cuproj
rapidsai_public_repos/cuspatial/python/cuproj/cuproj/_lib/CMakeLists.txt
# ============================================================================= # Copyright (c) 2023, NVIDIA CORPORATION. # # Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except # in compliance with the License. You may obtain a copy of the License at # # http://www.apache.o...
0
rapidsai_public_repos/cuspatial/python/cuproj/cuproj
rapidsai_public_repos/cuspatial/python/cuproj/cuproj/_lib/transform.pyx
import cupy as cp from libc.stdint cimport uintptr_t from libcpp.string cimport string from cuproj._lib.cpp.cuprojshim cimport make_projection, transform, vec_2d from cuproj._lib.cpp.operation cimport direction from cuproj._lib.cpp.projection cimport projection cdef direction_string_to_enum(dir: str): return di...
0
rapidsai_public_repos/cuspatial/python/cuproj/cuproj/_lib
rapidsai_public_repos/cuspatial/python/cuproj/cuproj/_lib/cpp/projection.pxd
from libcpp.vector cimport vector from cuproj._lib.cpp.operation cimport direction, operation_type from cuproj._lib.cpp.projection_parameters cimport projection_parameters cdef extern from "cuproj/projection.cuh" namespace "cuproj" nogil: cdef cppclass projection[Coordinate, T=*]: projection() pr...
0
rapidsai_public_repos/cuspatial/python/cuproj/cuproj/_lib
rapidsai_public_repos/cuspatial/python/cuproj/cuproj/_lib/cpp/operation.pxd
cdef extern from "cuproj/operation/operation.cuh" namespace "cuproj" nogil: cdef enum operation_type: AXIS_SWAP = 0 DEGREES_TO_RADIANS = 1 CLAMP_ANGULAR_COORDINATES = 2 OFFSET_SCALE_CARTESIAN_COORDINATES = 3 TRANSVERSE_MERCATOR = 4 cdef enum direction: FORWARD =...
0
rapidsai_public_repos/cuspatial/python/cuproj/cuproj/_lib
rapidsai_public_repos/cuspatial/python/cuproj/cuproj/_lib/cpp/cuprojshim.pxd
from libcpp.string cimport string from cuproj._lib.cpp.operation cimport direction from cuproj._lib.cpp.projection cimport projection cdef extern from "cuprojshim.hpp" namespace "cuproj" nogil: cdef cppclass vec_2d[T]: T x T y cdef extern from "cuprojshim.hpp" namespace "cuprojshim" nogil: p...
0
rapidsai_public_repos/cuspatial/python/cuproj/cuproj/_lib
rapidsai_public_repos/cuspatial/python/cuproj/cuproj/_lib/cpp/ellipsoid.pxd
cdef extern from "cuproj/ellipsoid.hpp" namespace "cuproj" nogil: cdef cppclass ellipsoid[T]: ellipsoid() except+ ellipsoid(T, T) except+
0
rapidsai_public_repos/cuspatial/python/cuproj/cuproj/_lib
rapidsai_public_repos/cuspatial/python/cuproj/cuproj/_lib/cpp/projection_parameters.pxd
from cuproj._lib.cpp.ellipsoid cimport ellipsoid cdef extern from "cuproj/projection_parameters.hpp" namespace "cuproj" nogil: cdef enum hemisphere: NORTH = 0 SOUTH = 1 cdef cppclass projection_parameters[T]: projection_parameters( ellipsoid[T], int, ...
0
rapidsai_public_repos/cuspatial/python
rapidsai_public_repos/cuspatial/python/cuspatial/pyproject.toml
# Copyright (c) 2022-2023, NVIDIA CORPORATION. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agre...
0
rapidsai_public_repos/cuspatial/python
rapidsai_public_repos/cuspatial/python/cuspatial/CMakeLists.txt
# ============================================================================= # Copyright (c) 2022-2023, NVIDIA CORPORATION. # # Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except # in compliance with the License. You may obtain a copy of the License at # # http://www.apa...
0
rapidsai_public_repos/cuspatial/python
rapidsai_public_repos/cuspatial/python/cuspatial/README.md
# <div align="left"><img src="https://rapids.ai/assets/images/rapids_logo.png" width="90px"/>&nbsp;cuSpatial - GPU-Accelerated Vector Geospatial Data Analysis</div> > **Note** > > cuSpatial depends on [cuDF](https://github.com/rapidsai/cudf) and [RMM](https://github.com/rapidsai/rmm) from [RAPIDS](https://rapids.ai/)....
0
rapidsai_public_repos/cuspatial/python
rapidsai_public_repos/cuspatial/python/cuspatial/setup.py
# Copyright (c) 2018-2023, NVIDIA CORPORATION. from setuptools import find_packages from skbuild import setup packages = find_packages(include=["cuspatial*"]) setup( packages=packages, package_data={ key: ["VERSION", "*.pxd", "*.hpp", "*.cuh"] for key in packages }, zip_safe=False, )
0
rapidsai_public_repos/cuspatial/python
rapidsai_public_repos/cuspatial/python/cuspatial/LICENSE
Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, ...
0
rapidsai_public_repos/cuspatial/python
rapidsai_public_repos/cuspatial/python/cuspatial/.coveragerc
# Configuration file for Python coverage tests [run] source = cuspatial
0
rapidsai_public_repos/cuspatial/python/cuspatial
rapidsai_public_repos/cuspatial/python/cuspatial/cuspatial/_version.py
# Copyright (c) 2023, NVIDIA CORPORATION. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to...
0
rapidsai_public_repos/cuspatial/python/cuspatial
rapidsai_public_repos/cuspatial/python/cuspatial/cuspatial/__init__.py
# Copyright (c) 2023, NVIDIA CORPORATION. from ._version import __git_commit__, __version__ from .core.geodataframe import GeoDataFrame from .core.geoseries import GeoSeries from .core.spatial import ( directed_hausdorff_distance, haversine_distance, join_quadtree_and_bounding_boxes, linestring_boundin...
0
rapidsai_public_repos/cuspatial/python/cuspatial
rapidsai_public_repos/cuspatial/python/cuspatial/cuspatial/VERSION
23.12.00
0
rapidsai_public_repos/cuspatial/python/cuspatial/cuspatial
rapidsai_public_repos/cuspatial/python/cuspatial/cuspatial/utils/join_utils.py
# Copyright (c) 2023, NVIDIA CORPORATION. import operator from numba import cuda import rmm from cudf.core.buffer import acquire_spill_lock @cuda.jit def binarize(in_col, out, width): """Convert any positive integer to a binary array.""" i = cuda.grid(1) if i < in_col.size: n = in_col[i] ...
0
rapidsai_public_repos/cuspatial/python/cuspatial/cuspatial
rapidsai_public_repos/cuspatial/python/cuspatial/cuspatial/utils/column_utils.py
# Copyright (c) 2020-2023, NVIDIA CORPORATION. from typing import TypeVar import numpy as np from cudf.api.types import is_datetime_dtype from cudf.core.column.column import column_empty from cuspatial.core._column.geometa import Feature_Enum from cuspatial.core.dtypes import ( linestring_dtype, multipoint_...
0
rapidsai_public_repos/cuspatial/python/cuspatial/cuspatial
rapidsai_public_repos/cuspatial/python/cuspatial/cuspatial/utils/binpred_utils.py
# Copyright (c) 2023, NVIDIA CORPORATION. import cupy as cp import numpy as np import cudf import cuspatial from cuspatial.core._column.geocolumn import ColumnType from cuspatial.core._column.geometa import Feature_Enum """Column-Type objects to use for simple syntax in the `DispatchDict` contained in each `feature...
0
rapidsai_public_repos/cuspatial/python/cuspatial/cuspatial
rapidsai_public_repos/cuspatial/python/cuspatial/cuspatial/tests/test_geodataframe.py
# Copyright (c) 2020-2021, NVIDIA CORPORATION. import geopandas as gpd import numpy as np import pandas as pd import pytest from geopandas.testing import assert_geodataframe_equal from shapely.affinity import rotate from shapely.geometry import ( LineString, MultiLineString, MultiPoint, MultiPolygon, ...
0
rapidsai_public_repos/cuspatial/python/cuspatial/cuspatial
rapidsai_public_repos/cuspatial/python/cuspatial/cuspatial/tests/test_none.py
# Copyright (c) 2022 NVIDIA CORPORATION. import geopandas as gpd import pandas as pd from shapely.geometry import Point, Polygon import cuspatial def test_got_from_geopandas(): expected = gpd.GeoSeries([None]) got = cuspatial.from_geopandas(expected) pd.testing.assert_series_equal(expected, got.to_geopan...
0
rapidsai_public_repos/cuspatial/python/cuspatial/cuspatial
rapidsai_public_repos/cuspatial/python/cuspatial/cuspatial/tests/test_from_geopandas.py
# Copyright (c) 2020-2021, NVIDIA CORPORATION. import geopandas as gpd import pandas as pd from shapely.geometry import ( LineString, MultiLineString, MultiPoint, MultiPolygon, Point, Polygon, ) import cudf import cuspatial def test_geobuffer_len(gs): cugs = cuspatial.from_geopandas(gs) ...
0
rapidsai_public_repos/cuspatial/python/cuspatial/cuspatial
rapidsai_public_repos/cuspatial/python/cuspatial/cuspatial/tests/test_cudf_integration.py
# Copyright (c) 2022 NVIDIA CORPORATION. import geopandas as gpd import numpy as np import pandas as pd import cuspatial def test_sort_index_series(gs): gs.index = np.random.permutation(len(gs)) cugs = cuspatial.from_geopandas(gs) expected = gs.sort_index() got = cugs.sort_index().to_pandas() gpd...
0
rapidsai_public_repos/cuspatial/python/cuspatial/cuspatial
rapidsai_public_repos/cuspatial/python/cuspatial/cuspatial/tests/conftest.py
# Copyright (c) 2020-2023, NVIDIA CORPORATION. import geopandas as gpd import numpy as np import pandas as pd import pytest from shapely.affinity import rotate from shapely.geometry import ( LineString, MultiLineString, MultiPoint, MultiPolygon, Point, Polygon, ) @pytest.fixture def gs(): ...
0
rapidsai_public_repos/cuspatial/python/cuspatial/cuspatial
rapidsai_public_repos/cuspatial/python/cuspatial/cuspatial/tests/test_geocolumn_accessor.py
# Copyright 2022 NVIDIA Corporation import cupy as cp import geopandas as gpd import pytest from shapely.geometry import ( LineString, MultiLineString, MultiPoint, MultiPolygon, Polygon, ) import cuspatial @pytest.mark.parametrize( "range, expected", [[slice(0, 3), [0, 3, 4, 5]], [slice(...
0
rapidsai_public_repos/cuspatial/python/cuspatial/cuspatial
rapidsai_public_repos/cuspatial/python/cuspatial/cuspatial/tests/test_align.py
# Copyright (c) 2022 NVIDIA CORPORATION. import geopandas as gpd import numpy as np import pandas as pd from shapely.geometry import Polygon import cuspatial def test_align_more_values(): gpdlhs = gpd.GeoSeries( [ Polygon(((-8, -8), (-8, 8), (8, 8), (8, -8))), Polygon(((-2, -2), ...
0
rapidsai_public_repos/cuspatial/python/cuspatial/cuspatial
rapidsai_public_repos/cuspatial/python/cuspatial/cuspatial/tests/test_trajectory.py
# Copyright (c) 2019-2020, NVIDIA CORPORATION. import numpy as np import pytest from shapely.geometry import Point import cudf import cuspatial def test_trajectory_bounding_boxes_empty_float32(): result = cuspatial.trajectory_bounding_boxes( 0, cudf.Series(), cuspatial.GeoSeries.from_po...
0
rapidsai_public_repos/cuspatial/python/cuspatial/cuspatial
rapidsai_public_repos/cuspatial/python/cuspatial/cuspatial/tests/test_geoseries.py
# Copyright (c) 2020-2021, NVIDIA CORPORATION. from enum import Enum from numbers import Integral import cupy as cp import geopandas as gpd import numpy as np import pandas as pd import pytest from geopandas.testing import assert_geoseries_equal from shapely.affinity import rotate from shapely.geometry import ( L...
0
rapidsai_public_repos/cuspatial/python/cuspatial/cuspatial/tests
rapidsai_public_repos/cuspatial/python/cuspatial/cuspatial/tests/basicpreds/test_equals_count.py
from pandas.testing import assert_series_equal from shapely.geometry import MultiPoint, Point import cudf import cuspatial from cuspatial.core.binops.equals_count import pairwise_multipoint_equals_count def test_pairwise_multipoint_equals_count_example_1(): p1 = cuspatial.GeoSeries([MultiPoint([Point(0, 0)])]) ...
0
rapidsai_public_repos/cuspatial/python/cuspatial/cuspatial/tests
rapidsai_public_repos/cuspatial/python/cuspatial/cuspatial/tests/basicpreds/test_contains_basic_predicate.py
# Copyright (c) 2023, NVIDIA CORPORATION. from shapely.geometry import LineString, Point, Polygon import cuspatial from cuspatial.core.binpreds.basic_predicates import ( _basic_contains_any, _basic_contains_count, ) def test_basic_contains_any_outside(): lhs = cuspatial.GeoSeries([Polygon([(0, 0), (0, 1...
0
rapidsai_public_repos/cuspatial/python/cuspatial/cuspatial/tests
rapidsai_public_repos/cuspatial/python/cuspatial/cuspatial/tests/basicpreds/test_equals_basic_predicate.py
import pandas as pd from pandas.testing import assert_series_equal from shapely.geometry import Point import cuspatial from cuspatial.core.binpreds.basic_predicates import _basic_equals_any def test_single_true(): p1 = cuspatial.GeoSeries([Point(0, 0)]) p2 = cuspatial.GeoSeries([Point(0, 0)]) result = _b...
0
rapidsai_public_repos/cuspatial/python/cuspatial/cuspatial/tests
rapidsai_public_repos/cuspatial/python/cuspatial/cuspatial/tests/basicpreds/test_intersects_basic_predicate.py
import pandas as pd from pandas.testing import assert_series_equal from shapely.geometry import LineString, Point, Polygon import cuspatial from cuspatial.core.binpreds.basic_predicates import _basic_intersects def test_single_true(): p1 = cuspatial.GeoSeries([Point(0, 0)]) p2 = cuspatial.GeoSeries([Point(0,...
0
rapidsai_public_repos/cuspatial/python/cuspatial/cuspatial/tests
rapidsai_public_repos/cuspatial/python/cuspatial/cuspatial/tests/basicpreds/test_intersections.py
import geopandas as gpd import pandas as pd from geopandas.testing import assert_geoseries_equal from pandas.testing import assert_frame_equal, assert_series_equal from shapely.geometry import LineString, MultiLineString, Point import cuspatial from cuspatial.core.binops.intersection import pairwise_linestring_interse...
0
rapidsai_public_repos/cuspatial/python/cuspatial/cuspatial/tests/spatial
rapidsai_public_repos/cuspatial/python/cuspatial/cuspatial/tests/spatial/filtering/test_points_in_spatial_window.py
# Copyright (c) 2019-2023, NVIDIA CORPORATION. import geopandas as gpd import pytest from geopandas.testing import assert_geoseries_equal from shapely.geometry import Point import cuspatial def test_zeros(): result = cuspatial.points_in_spatial_window( # noqa: F841 cuspatial.GeoSeries([Point(0, 0)]), 0...
0
rapidsai_public_repos/cuspatial/python/cuspatial/cuspatial/tests/spatial
rapidsai_public_repos/cuspatial/python/cuspatial/cuspatial/tests/spatial/projection/test_sinusoidal_projection.py
# Copyright (c) 2019-2023, NVIDIA CORPORATION. import pytest from geopandas.testing import assert_geoseries_equal from shapely.geometry import Point import cudf import cuspatial def test_camera_oob_0(): with pytest.raises(RuntimeError): result = cuspatial.sinusoidal_projection( # noqa: F841 ...
0
rapidsai_public_repos/cuspatial/python/cuspatial/cuspatial/tests/spatial
rapidsai_public_repos/cuspatial/python/cuspatial/cuspatial/tests/spatial/nearest_points/test_nearest_points.py
import geopandas as gpd import pytest import shapely from geopandas.testing import assert_geodataframe_equal from shapely.geometry import LineString, MultiLineString, MultiPoint, Point import cuspatial def compute_point_linestring_nearest_point_host(gs1, gs2): gpdf = gpd.GeoDataFrame({"lhs": gs1, "rhs": gs2}) ...
0
rapidsai_public_repos/cuspatial/python/cuspatial/cuspatial/tests/spatial
rapidsai_public_repos/cuspatial/python/cuspatial/cuspatial/tests/spatial/join/test_point_in_polygon.py
# Copyright (c) 2019, NVIDIA CORPORATION. import numpy as np import cudf import cuspatial from cuspatial.core.spatial.join import pip_bitmap_column_to_binary_array def test_empty(): result = cuspatial.point_in_polygon( cuspatial.GeoSeries([]), cuspatial.GeoSeries([]) ) cudf.testing.assert_frame...
0
rapidsai_public_repos/cuspatial/python/cuspatial/cuspatial/tests/spatial
rapidsai_public_repos/cuspatial/python/cuspatial/cuspatial/tests/spatial/join/test_spatial_join.py
# Copyright (c) 2020-2022, NVIDIA CORPORATION. import cupy as cp import numpy as np import pytest import cudf import cuspatial bbox_1 = (0, 1, 0, 1) bbox_2 = (0, 2, 0, 2) small_poly_offsets = cudf.Series([0, 1, 2, 3, 4], dtype=np.uint32) small_ring_offsets = cudf.Series([0, 4, 10, 14, 19], dtype=np.uint32) small_...
0
rapidsai_public_repos/cuspatial/python/cuspatial/cuspatial/tests/spatial
rapidsai_public_repos/cuspatial/python/cuspatial/cuspatial/tests/spatial/bounding/test_polygon_bounding_boxes.py
# Copyright (c) 2020-2023, NVIDIA CORPORATION. import pytest from shapely.geometry import MultiPolygon, Polygon import cudf import cuspatial def test_polygon_bounding_boxes_empty(): s = cuspatial.GeoSeries([]) result = cuspatial.polygon_bounding_boxes(s) cudf.testing.assert_frame_equal( result,...
0
rapidsai_public_repos/cuspatial/python/cuspatial/cuspatial/tests/spatial
rapidsai_public_repos/cuspatial/python/cuspatial/cuspatial/tests/spatial/bounding/test_linestring_bounding_boxes.py
# Copyright (c) 2020-2023, NVIDIA CORPORATION. import numpy as np import pytest from shapely.geometry import MultiLineString import cudf import cuspatial def test_linestring_bounding_boxes_empty(): result = cuspatial.linestring_bounding_boxes( cuspatial.GeoSeries([]), 0, # expansion_radius ...
0
rapidsai_public_repos/cuspatial/python/cuspatial/cuspatial/tests/spatial
rapidsai_public_repos/cuspatial/python/cuspatial/cuspatial/tests/spatial/distance/test_pairwise_linestring_distance.py
# Copyright (c) 2023, NVIDIA CORPORATION. from shapely.geometry import LineString import cudf from cudf.testing._utils import assert_eq import cuspatial def test_zero_pair(): ls1 = cuspatial.GeoSeries([]) ls2 = cuspatial.GeoSeries([]) got = cuspatial.pairwise_linestring_distance(ls1, ls2) expected...
0
rapidsai_public_repos/cuspatial/python/cuspatial/cuspatial/tests/spatial
rapidsai_public_repos/cuspatial/python/cuspatial/cuspatial/tests/spatial/distance/test_pairwise_point_distance.py
# Copyright (c) 2023, NVIDIA CORPORATION. import geopandas as gpd import pytest from pandas.testing import assert_series_equal from shapely.geometry import LineString, Point import cuspatial def test_empty(): gs1 = cuspatial.GeoSeries([]) gs2 = cuspatial.GeoSeries([]) assert cuspatial.pairwise_point_dis...
0
rapidsai_public_repos/cuspatial/python/cuspatial/cuspatial/tests/spatial
rapidsai_public_repos/cuspatial/python/cuspatial/cuspatial/tests/spatial/distance/test_pairwise_linestring_polygon_distance.py
# Copyright (c) 2023, NVIDIA CORPORATION. import geopandas as gpd import pytest from shapely.geometry import LineString, MultiLineString, MultiPolygon, Polygon import cudf from cudf.testing import assert_series_equal import cuspatial def test_linestring_polygon_empty(): lhs = cuspatial.GeoSeries.from_linestrin...
0
rapidsai_public_repos/cuspatial/python/cuspatial/cuspatial/tests/spatial
rapidsai_public_repos/cuspatial/python/cuspatial/cuspatial/tests/spatial/distance/test_pairwise_polygon_distance.py
# Copyright (c) 2023, NVIDIA CORPORATION. import cupy as cp import geopandas as gpd import pytest from shapely.geometry import MultiPolygon, Polygon import cudf from cudf.testing import assert_series_equal import cuspatial def test_polygon_empty(): lhs = cuspatial.GeoSeries.from_polygons_xy([], [0], [0], [0]) ...
0
rapidsai_public_repos/cuspatial/python/cuspatial/cuspatial/tests/spatial
rapidsai_public_repos/cuspatial/python/cuspatial/cuspatial/tests/spatial/distance/test_distance.py
from functools import partial from itertools import product import geopandas import pytest from shapely.geometry import ( LineString, MultiLineString, MultiPoint, MultiPolygon, Point, Polygon, ) import cudf from cudf.testing import assert_series_equal import cuspatial geometry_types = set( ...
0
rapidsai_public_repos/cuspatial/python/cuspatial/cuspatial/tests/spatial
rapidsai_public_repos/cuspatial/python/cuspatial/cuspatial/tests/spatial/distance/test_point_linestring_distance.py
import geopandas as gpd import pytest from shapely.geometry import ( LineString, MultiLineString, MultiPoint, Point, Polygon, ) import cudf from cuspatial import pairwise_point_linestring_distance from cuspatial.io.geopandas import from_geopandas @pytest.mark.parametrize( "points, lines", ...
0
rapidsai_public_repos/cuspatial/python/cuspatial/cuspatial/tests/spatial
rapidsai_public_repos/cuspatial/python/cuspatial/cuspatial/tests/spatial/distance/test_pairwise_point_polygon_distance.py
# Copyright (c) 2023, NVIDIA CORPORATION. import geopandas as gpd import pytest from shapely.geometry import MultiPoint, MultiPolygon, Point, Polygon import cudf from cudf.testing import assert_series_equal import cuspatial def test_point_polygon_empty(): lhs = cuspatial.GeoSeries.from_points_xy([]) rhs = ...
0
rapidsai_public_repos/cuspatial/python/cuspatial/cuspatial/tests/spatial
rapidsai_public_repos/cuspatial/python/cuspatial/cuspatial/tests/spatial/distance/test_hausdorff_distance.py
# Copyright (c) 2019-2023, NVIDIA CORPORATION. from shapely.geometry import MultiPoint import cudf import cuspatial def _test_hausdorff_from_list_of_spaces(spaces): s = cuspatial.GeoSeries([MultiPoint(coords) for coords in spaces]) return cuspatial.directed_hausdorff_distance(s) def test_empty(): actu...
0
rapidsai_public_repos/cuspatial/python/cuspatial/cuspatial/tests/spatial
rapidsai_public_repos/cuspatial/python/cuspatial/cuspatial/tests/spatial/distance/test_haversine_distance.py
# Copyright (c) 2019-2023, NVIDIA CORPORATION. import geopandas as gpd import numpy as np import pandas as pd from shapely.geometry import Point import cuspatial def test_zeros(): distance = cuspatial.haversine_distance( cuspatial.GeoSeries([Point(0, 0)]), cuspatial.GeoSeries([Point(0, 0)]) ) as...
0
rapidsai_public_repos/cuspatial/python/cuspatial/cuspatial/tests/spatial
rapidsai_public_repos/cuspatial/python/cuspatial/cuspatial/tests/spatial/indexing/test_indexing.py
# Copyright (c) 2020-2023, NVIDIA CORPORATION. import numpy as np import pytest from shapely.geometry import Point import cudf import cuspatial bbox_1 = (0, 1, 0, 1) bbox_2 = (0, 2, 0, 2) def test_empty(): # empty should not throw order, quadtree = cuspatial.quadtree_on_points( cuspatial.GeoSeries(...
0
rapidsai_public_repos/cuspatial/python/cuspatial/cuspatial/tests
rapidsai_public_repos/cuspatial/python/cuspatial/cuspatial/tests/binpreds/test_equals_only_binpreds.py
# Copyright (c) 2020-2023, NVIDIA CORPORATION import geopandas as gpd import pandas as pd import pytest from shapely.geometry import LineString, MultiPoint, Point, Polygon import cuspatial def test_point_geom_equals_point(): gpdpoint1 = gpd.GeoSeries([Point(0, 0)]) gpdpoint2 = gpd.GeoSeries([Point(0, 0)]) ...
0
rapidsai_public_repos/cuspatial/python/cuspatial/cuspatial/tests
rapidsai_public_repos/cuspatial/python/cuspatial/cuspatial/tests/binpreds/test_binpred_test_dispatch.py
# Copyright (c) 2023, NVIDIA CORPORATION. import os import pandas as pd from binpred_test_dispatch import predicate, simple_test # noqa: F401 # In the below file, all failing tests are recorded with visualizations. LOG_DISPATCHED_PREDICATES = os.environ.get("LOG_DISPATCHED_PREDICATES", False) if LOG_DISPATCHED_PRED...
0
rapidsai_public_repos/cuspatial/python/cuspatial/cuspatial/tests
rapidsai_public_repos/cuspatial/python/cuspatial/cuspatial/tests/binpreds/test_intersects_only_binpreds.py
# Copyright (c) 2020-2023, NVIDIA CORPORATION import pandas as pd import pytest from shapely.geometry import ( LineString, MultiLineString, MultiPoint, MultiPolygon, Point, Polygon, ) import cuspatial def test_point_intersects_point(): g1 = cuspatial.GeoSeries([Point(0.0, 0.0)]) g2 =...
0
rapidsai_public_repos/cuspatial/python/cuspatial/cuspatial/tests
rapidsai_public_repos/cuspatial/python/cuspatial/cuspatial/tests/binpreds/test_contains_properly.py
# Copyright (c) 2023, NVIDIA CORPORATION import cupy as cp import geopandas as gpd import numpy as np import pytest from shapely.geometry import LineString, MultiPolygon, Point, Polygon import cuspatial def test_manual_polygons(): gpdlhs = gpd.GeoSeries([Polygon(((-8, -8), (-8, 8), (8, 8), (8, -8)))] * 6) g...
0
rapidsai_public_repos/cuspatial/python/cuspatial/cuspatial/tests
rapidsai_public_repos/cuspatial/python/cuspatial/cuspatial/tests/binpreds/test_pip_only_binpreds.py
from shapely.geometry import LineString, Point, Polygon import cuspatial """Overlaps, Within, and Intersects""" def _test(lhs, rhs, predicate): gpdlhs = lhs.to_geopandas() gpdrhs = rhs.to_geopandas() got = getattr(lhs, predicate)(rhs).values_host expected = getattr(gpdlhs, predicate)(gpdrhs).values ...
0
rapidsai_public_repos/cuspatial/python/cuspatial/cuspatial/tests
rapidsai_public_repos/cuspatial/python/cuspatial/cuspatial/tests/binpreds/binpred_test_dispatch.py
# Copyright (c) 2023, NVIDIA CORPORATION. import pytest from shapely.geometry import LineString, Point, Polygon import cuspatial from cuspatial.testing.test_geometries import ( # noqa: F401 features, linestring_linestring_dispatch_list, linestring_polygon_dispatch_list, point_linestring_dispatch_list...
0
rapidsai_public_repos/cuspatial/python/cuspatial/cuspatial/tests
rapidsai_public_repos/cuspatial/python/cuspatial/cuspatial/tests/binpreds/test_binpred_internals.py
# Copyright (c) 2020-2023, NVIDIA CORPORATION import pandas as pd from shapely.geometry import LineString, MultiPoint, Point, Polygon import cudf import cuspatial from cuspatial.core.binpreds.binpred_dispatch import EQUALS_DISPATCH from cuspatial.utils.binpred_utils import ( _open_polygon_rings, _pli_lines_t...
0
rapidsai_public_repos/cuspatial/python/cuspatial/cuspatial/tests
rapidsai_public_repos/cuspatial/python/cuspatial/cuspatial/tests/binpreds/test_binpred_cartesian_dispatch_list.py
# Copyright (c) 2023, NVIDIA CORPORATION. import geopandas import numpy as np from binpred_test_dispatch import predicate # noqa: F401 import cuspatial from cuspatial.testing.test_geometries import ( features, linestring_linestring_dispatch_list, linestring_polygon_dispatch_list, point_linestring_dis...
0
rapidsai_public_repos/cuspatial/python/cuspatial/cuspatial/tests
rapidsai_public_repos/cuspatial/python/cuspatial/cuspatial/tests/binpreds/summarize_binpred_test_dispatch_results.py
# Copyright (c) 2023, NVIDIA CORPORATION. """Prints a summary of the results of the binary predicate test dispatch. """ import pandas as pd pp = pd.read_csv("predicate_passes.csv") pf = pd.read_csv("predicate_fails.csv") fp = pd.read_csv("feature_passes.csv") ff = pd.read_csv("feature_fails.csv") print(pp) print(pf...
0
rapidsai_public_repos/cuspatial/python/cuspatial/cuspatial/tests
rapidsai_public_repos/cuspatial/python/cuspatial/cuspatial/tests/binpreds/test_contains.py
# Copyright (c) 2023, NVIDIA CORPORATION import geopandas as gpd import pandas as pd import pytest from shapely.geometry import MultiPolygon, Polygon import cuspatial def test_manual_polygons(): gpdlhs = gpd.GeoSeries([Polygon(((-8, -8), (-8, 8), (8, 8), (8, -8)))] * 6) gpdrhs = gpd.GeoSeries( [ ...
0
rapidsai_public_repos/cuspatial/python/cuspatial/cuspatial/tests
rapidsai_public_repos/cuspatial/python/cuspatial/cuspatial/tests/binpreds/test_binpred_each_dispatch_list.py
# Copyright (c) 2023, NVIDIA CORPORATION. import geopandas from binpred_test_dispatch import predicate # noqa: F401 import cuspatial from cuspatial.testing.test_geometries import ( features, linestring_linestring_dispatch_list, linestring_polygon_dispatch_list, point_linestring_dispatch_list, poi...
0
rapidsai_public_repos/cuspatial/python/cuspatial/cuspatial
rapidsai_public_repos/cuspatial/python/cuspatial/cuspatial/testing/test_geometries.py
# Copyright (c) 2023, NVIDIA CORPORATION. from shapely.geometry import LineString, Point, Polygon """The fundamental set of tests. This section is dispatched based on the feature type. Each feature pairing has a specific set of comparisons that need to be performed to cover the entire test space. This section contains...
0
rapidsai_public_repos/cuspatial/python/cuspatial/cuspatial
rapidsai_public_repos/cuspatial/python/cuspatial/cuspatial/core/trajectory.py
# Copyright (c) 2019-2022, NVIDIA CORPORATION. import numpy as np from cudf import DataFrame, Series from cudf.core.column import as_column from cuspatial import GeoSeries from cuspatial._lib.trajectory import ( derive_trajectories as cpp_derive_trajectories, trajectory_bounding_boxes as cpp_trajectory_bound...
0
rapidsai_public_repos/cuspatial/python/cuspatial/cuspatial
rapidsai_public_repos/cuspatial/python/cuspatial/cuspatial/core/geoseries.py
# Copyright (c) 2020-2023, NVIDIA CORPORATION from functools import cached_property from numbers import Integral from typing import Optional, Tuple, TypeVar, Union import cupy as cp import geopandas as gpd import numpy as np import pandas as pd import pyarrow as pa from geopandas.geoseries import GeoSeries as gpGeoSe...
0
rapidsai_public_repos/cuspatial/python/cuspatial/cuspatial
rapidsai_public_repos/cuspatial/python/cuspatial/cuspatial/core/geodataframe.py
# Copyright (c) 2020-2022, NVIDIA CORPORATION from typing import Dict, Tuple, TypeVar, Union import pandas as pd from geopandas import GeoDataFrame as gpGeoDataFrame from geopandas.geoseries import is_geometry_type as gp_is_geometry_type import cudf from cudf.core.copy_types import BooleanMask, GatherMap from cuspat...
0
rapidsai_public_repos/cuspatial/python/cuspatial/cuspatial
rapidsai_public_repos/cuspatial/python/cuspatial/cuspatial/core/dtypes.py
# Copyright (c) 2023, NVIDIA CORPORATION. from cudf.core.dtypes import ListDtype def point_dtype(base_dtype): return ListDtype(base_dtype) def multipoint_dtype(base_dtype): return ListDtype(ListDtype(base_dtype)) def linestring_dtype(base_dtype): return ListDtype(ListDtype(ListDtype(base_dtype))) d...
0
rapidsai_public_repos/cuspatial/python/cuspatial/cuspatial/core
rapidsai_public_repos/cuspatial/python/cuspatial/cuspatial/core/spatial/projection.py
# Copyright (c) 2022, NVIDIA CORPORATION. from cudf import DataFrame from cuspatial._lib.spatial import ( sinusoidal_projection as cpp_sinusoidal_projection, ) from cuspatial.core.geoseries import GeoSeries from cuspatial.utils.column_utils import ( contain_single_type_geometry, contains_only_multipoints,...
0