Skip to content

Commit d4ab1de

Browse files
committed
Fix some intersphinx links and other minor edits to the docstrings
Change from mkdocstrings cross-ref syntax to sphinx syntax, removed some type ignores, changed a url from github to readthedocs, and removed a reference to image-tiff. Also changed the doctest TIF file to a non-ZSTD compressed version because nvcomp might not be installed.
1 parent 8abf84e commit d4ab1de

1 file changed

Lines changed: 8 additions & 8 deletions

File tree

cupy_xarray/cog3pio.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
import os
66
from collections.abc import Iterable
77

8-
import cupy as cp # type: ignore[import-untyped]
8+
import cupy as cp
99
import numpy as np
1010
import xarray as xr
1111
from cog3pio import CudaCogReader
@@ -22,12 +22,12 @@ class Cog3pioBackendEntrypoint(BackendEntrypoint):
2222
2323
Examples
2424
--------
25-
Read a GeoTIFF from a HTTP url into an [xarray.DataArray][]:
25+
Read a GeoTIFF from a HTTP url into an :class:`xarray.DataArray`:
2626
2727
>>> import xarray as xr
2828
>>> # Read GeoTIFF into an xarray.DataArray
2929
>>> dataarray: xr.DataArray = xr.open_dataarray(
30-
... filename_or_obj="https://github.com/OSGeo/gdal/raw/v3.11.0/autotest/gcore/data/byte_zstd.tif",
30+
... filename_or_obj="https://github.com/OSGeo/gdal/raw/v3.11.0/autotest/gcore/data/byte.tif",
3131
... engine="cog3pio",
3232
... device_id=0, # cuda:0
3333
... )
@@ -40,9 +40,9 @@ class Cog3pioBackendEntrypoint(BackendEntrypoint):
4040

4141
description = "Use .tif files in Xarray"
4242
open_dataset_parameters = ("filename_or_obj", "drop_variables", "device_id")
43-
url = "https://github.com/weiji14/cog3pio"
43+
url = "https://cog3pio.readthedocs.io/en/latest/"
4444

45-
def open_dataset( # type: ignore[override]
45+
def open_dataset(
4646
self,
4747
filename_or_obj: str,
4848
*,
@@ -53,13 +53,13 @@ def open_dataset( # type: ignore[override]
5353
mask_and_scale=None,
5454
) -> xr.Dataset:
5555
"""
56-
Backend open_dataset method used by Xarray in [xarray.open_dataset][].
56+
Backend open_dataset method used by Xarray in :py:func:`xarray.open_dataset`.
5757
5858
Parameters
5959
----------
6060
filename_or_obj : str
61-
File path or url to a TIFF (.tif) image file that can be read by the
62-
nvTIFF or image-tiff backend library.
61+
File path or url to a TIFF (.tif) image file that can be read by cog3pio's
62+
nvTIFF backend.
6363
device_id : int | None
6464
CUDA device ID on which to place the created cupy array. Default is None,
6565
which means device_id will be inferred via

0 commit comments

Comments
 (0)