From 7a02fb20cc18fa18a9f5cd5299fe71c353a9b486 Mon Sep 17 00:00:00 2001 From: Dimitri Papadopoulos <3234522+DimitriPapadopoulos@users.noreply.github.com> Date: Thu, 7 Nov 2024 22:58:58 +0100 Subject: [PATCH] =?UTF-8?q?http://=20=E2=86=92=20https://?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/ISSUE_TEMPLATE/bugreport.yml | 2 +- .github/config.yml | 2 +- CODE_OF_CONDUCT.md | 6 ++--- CONTRIBUTING.md | 2 +- README.md | 2 +- asv_bench/asv.conf.json | 2 +- design_notes/flexible_indexes_notes.md | 2 +- doc/contributing.rst | 28 +++++++++++----------- doc/ecosystem.rst | 6 ++--- doc/examples/ROMS_ocean_model.ipynb | 2 +- doc/examples/multidimensional-coords.ipynb | 2 +- doc/getting-started-guide/why-xarray.rst | 14 +++++------ doc/roadmap.rst | 2 +- doc/user-guide/dask.rst | 2 +- doc/user-guide/io.rst | 10 ++++---- xarray/backends/zarr.py | 6 ++--- xarray/coding/strings.py | 2 +- xarray/core/common.py | 2 +- xarray/core/dataarray.py | 4 ++-- xarray/core/dataset.py | 4 ++-- xarray/core/datatree.py | 2 +- xarray/tests/test_groupby.py | 6 ++--- 22 files changed, 55 insertions(+), 55 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/bugreport.yml b/.github/ISSUE_TEMPLATE/bugreport.yml index cc1a2e12be3..5bd7efd12f1 100644 --- a/.github/ISSUE_TEMPLATE/bugreport.yml +++ b/.github/ISSUE_TEMPLATE/bugreport.yml @@ -37,7 +37,7 @@ body: Please confirm that the bug report is in an excellent state, so we can understand & fix it quickly & efficiently. For more details, check out: - [Minimal Complete Verifiable Examples](https://stackoverflow.com/help/mcve) - - [Craft Minimal Bug Reports](http://matthewrocklin.com/blog/work/2018/02/28/minimal-bug-reports) + - [Craft Minimal Bug Reports](https://matthewrocklin.com/minimal-bug-reports) options: - label: Minimal example — the example is as focused as reasonably possible to demonstrate the underlying issue in xarray. diff --git a/.github/config.yml b/.github/config.yml index c64c2e28e59..d11c3b7bea7 100644 --- a/.github/config.yml +++ b/.github/config.yml @@ -14,7 +14,7 @@ newIssueWelcomeComment: > newPRWelcomeComment: > Thank you for opening this pull request! It may take us a few days to respond here, so thank you for being patient. - If you have questions, some answers may be found in our [contributing guidelines](http://docs.xarray.dev/en/stable/contributing.html). + If you have questions, some answers may be found in our [contributing guidelines](https://docs.xarray.dev/en/stable/contributing.html). # Comment to be posted to on pull requests merged by a first time user firstPRMergeComment: > diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md index d457a9e9a4d..541fd2fa659 100644 --- a/CODE_OF_CONDUCT.md +++ b/CODE_OF_CONDUCT.md @@ -40,7 +40,7 @@ Project maintainers who do not follow or enforce the Code of Conduct in good fai ## Attribution -This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version] +This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [https://contributor-covenant.org/version/1/4][version] -[homepage]: http://contributor-covenant.org -[version]: http://contributor-covenant.org/version/1/4/ +[homepage]: https://contributor-covenant.org +[version]: https://contributor-covenant.org/version/1/4/ diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index dd9931f907b..9fef07e9a5e 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1 +1 @@ -Xarray's contributor guidelines [can be found in our online documentation](http://docs.xarray.dev/en/stable/contributing.html) +Xarray's contributor guidelines [can be found in our online documentation](https://docs.xarray.dev/en/stable/contributing.html) diff --git a/README.md b/README.md index 8fc8ff335d4..8dc5ceb1fb9 100644 --- a/README.md +++ b/README.md @@ -94,7 +94,7 @@ our efforts. ## History Xarray is an evolution of an internal tool developed at [The Climate -Corporation](http://climate.com/). It was originally written by Climate +Corporation](https://climate.com/). It was originally written by Climate Corp researchers Stephan Hoyer, Alex Kleeman and Eugene Brevdo and was released as open source in May 2014. The project was renamed from "xray" in January 2016. Xarray became a fiscally sponsored project of diff --git a/asv_bench/asv.conf.json b/asv_bench/asv.conf.json index 9dc86df712d..ab256079c90 100644 --- a/asv_bench/asv.conf.json +++ b/asv_bench/asv.conf.json @@ -7,7 +7,7 @@ "project": "xarray", // The project's homepage - "project_url": "http://docs.xarray.dev/", + "project_url": "https://docs.xarray.dev/", // The URL or local path of the source code repository for the // project being benchmarked diff --git a/design_notes/flexible_indexes_notes.md b/design_notes/flexible_indexes_notes.md index f4a2c1c2125..c53acfa62b7 100644 --- a/design_notes/flexible_indexes_notes.md +++ b/design_notes/flexible_indexes_notes.md @@ -133,7 +133,7 @@ A possible, more explicit solution to reuse a `pandas.MultiIndex` in a DataArray New indexes may also be built from existing sets of coordinates or variables in a Dataset/DataArray using the `.set_index()` method. -The [current signature](http://docs.xarray.dev/en/stable/generated/xarray.DataArray.set_index.html#xarray.DataArray.set_index) of `.set_index()` is tailored to `pandas.MultiIndex` and tied to the concept of a dimension-index. It is therefore hardly reusable as-is in the context of flexible indexes proposed here. +The [current signature](https://docs.xarray.dev/en/stable/generated/xarray.DataArray.set_index.html#xarray.DataArray.set_index) of `.set_index()` is tailored to `pandas.MultiIndex` and tied to the concept of a dimension-index. It is therefore hardly reusable as-is in the context of flexible indexes proposed here. The new signature may look like one of these: diff --git a/doc/contributing.rst b/doc/contributing.rst index 5f943e82558..6d269a9f0f7 100644 --- a/doc/contributing.rst +++ b/doc/contributing.rst @@ -7,7 +7,7 @@ Contributing to xarray .. note:: Large parts of this document came from the `Pandas Contributing - Guide `_. + Guide `_. Overview ======== @@ -68,7 +68,7 @@ If you are reporting a bug, please use the provided template which includes the #. Include a short, self-contained Python snippet reproducing the problem. You can format the code nicely by using `GitHub Flavored Markdown - `_:: + `_:: ```python import xarray as xr @@ -106,7 +106,7 @@ Version control, Git, and GitHub The code is hosted on `GitHub `_. To contribute you will need to sign up for a `free GitHub account -`_. We use `Git `_ for +`_. We use `Git `_ for version control to allow many people to work together on the project. Some great resources for learning Git: @@ -327,7 +327,7 @@ To return to your root environment:: conda deactivate -See the full `conda docs here `__. +See the full `conda docs here `__. Install pre-commit hooks ------------------------ @@ -365,9 +365,9 @@ About the *xarray* documentation -------------------------------- The documentation is written in **reStructuredText**, which is almost like writing -in plain English, and built using `Sphinx `__. The +in plain English, and built using `Sphinx `__. The Sphinx Documentation has an excellent `introduction to reST -`__. Review the Sphinx docs to perform more +`__. Review the Sphinx docs to perform more complex changes to the documentation as well. Some other important things to know about the docs: @@ -388,7 +388,7 @@ Some other important things to know about the docs: extend it in a similar manner. - The tutorials make heavy use of the `ipython directive - `_ sphinx extension. + `_ sphinx extension. This directive lets you put code in the documentation which will be run during the doc build. For example: @@ -551,7 +551,7 @@ xarray uses several tools to ensure a consistent code format throughout the proj - `ruff `_ for formatting, code quality checks and standardized order in imports - `absolufy-imports `_ for absolute instead of relative imports from different files, -- `mypy `_ for static type checking on `type hints +- `mypy `_ for static type checking on `type hints `_. We highly recommend that you setup `pre-commit hooks `_ @@ -624,7 +624,7 @@ Test-driven development/code writing ------------------------------------ *xarray* is serious about testing and strongly encourages contributors to embrace -`test-driven development (TDD) `_. +`test-driven development (TDD) `_. This development process "relies on the repetition of a very short development cycle: first the developer writes an (initially failing) automated test case that defines a desired improvement or new function, then produces the minimum amount of code to pass that test." @@ -636,7 +636,7 @@ Adding tests is one of the most common requests after code is pushed to *xarray* it is worth getting in the habit of writing tests ahead of time so that this is never an issue. Like many packages, *xarray* uses `pytest -`_ and the convenient +`_ and the convenient extensions in `numpy.testing `_. @@ -669,7 +669,7 @@ typically find tests wrapped in a class. class TestReallyCoolFeature: ... Going forward, we are moving to a more *functional* style using the -`pytest `__ framework, which offers a richer +`pytest `__ framework, which offers a richer testing framework that will facilitate testing and developing. Thus, instead of writing test classes, we will write test functions like this: @@ -816,7 +816,7 @@ speed up local testing on multicore machines, by running pytest with the optiona This can significantly reduce the time it takes to locally run tests before submitting a pull request. -For more, see the `pytest `_ documentation. +For more, see the `pytest `_ documentation. Running the performance test suite ---------------------------------- @@ -891,7 +891,7 @@ Learn `how to write a benchmark and how to use asv from the documentation `_. + available `here `_. Documenting your code --------------------- @@ -1062,7 +1062,7 @@ PR checklist - **Test your code**. - Write new tests if needed. See `"Test-driven development/code writing" `_. - - Test the code using `Pytest `_. Running all tests (type ``pytest`` in the root directory) takes a while, so feel free to only run the tests you think are needed based on your PR (example: ``pytest xarray/tests/test_dataarray.py``). CI will catch any failing tests. + - Test the code using `Pytest `_. Running all tests (type ``pytest`` in the root directory) takes a while, so feel free to only run the tests you think are needed based on your PR (example: ``pytest xarray/tests/test_dataarray.py``). CI will catch any failing tests. - By default, the upstream dev CI is disabled on pull request and push events. You can override this behavior per commit by adding a ``[test-upstream]`` tag to the first line of the commit message. For documentation-only commits, you can skip the CI per commit by adding a ``[skip-ci]`` tag to the first line of the commit message. - **Properly format your code** and verify that it passes the formatting guidelines set by `ruff `_. See `"Code formatting" `_. You can use `pre-commit `_ to run these automatically on each commit. diff --git a/doc/ecosystem.rst b/doc/ecosystem.rst index 1fa1ed42509..d5123669209 100644 --- a/doc/ecosystem.rst +++ b/doc/ecosystem.rst @@ -52,7 +52,7 @@ Geosciences - `xclim `_: A library for calculating climate science indices with unit handling built from xarray and dask. - `xESMF `_: Universal regridder for geospatial data. - `xgcm `_: Extends the xarray data model to understand finite volume grid cells (common in General Circulation Models) and provides interpolation and difference operations for such grids. -- `xmitgcm `_: a python package for reading `MITgcm `_ binary MDS files into xarray data structures. +- `xmitgcm `_: a python package for reading `MITgcm `_ binary MDS files into xarray data structures. - `xnemogcm `_: a package to read `NEMO `_ output files and add attributes to interface with xgcm. Machine Learning @@ -87,11 +87,11 @@ Extend xarray capabilities - `xr-scipy `_: A lightweight scipy wrapper for xarray. - `X-regression `_: Multiple linear regression from Statsmodels library coupled with Xarray library. - `xskillscore `_: Metrics for verifying forecasts. -- `xyzpy `_: Easily generate high dimensional data, including parallelization. +- `xyzpy `_: Easily generate high dimensional data, including parallelization. Visualization ~~~~~~~~~~~~~ -- `datashader `_, `geoviews `_, `holoviews `_, : visualization packages for large data. +- `datashader `_, `geoviews `_, `holoviews `_, : visualization packages for large data. - `hvplot `_ : A high-level plotting API for the PyData ecosystem built on HoloViews. - `psyplot `_: Interactive data visualization with python. - `xarray-leaflet `_: An xarray extension for tiled map plotting based on ipyleaflet. diff --git a/doc/examples/ROMS_ocean_model.ipynb b/doc/examples/ROMS_ocean_model.ipynb index d5c76380525..cca72d982ba 100644 --- a/doc/examples/ROMS_ocean_model.ipynb +++ b/doc/examples/ROMS_ocean_model.ipynb @@ -11,7 +11,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "The Regional Ocean Modeling System ([ROMS](http://myroms.org)) is an open source hydrodynamic model that is used for simulating currents and water properties in coastal and estuarine regions. ROMS is one of a few standard ocean models, and it has an active user community.\n", + "The Regional Ocean Modeling System ([ROMS](https://www.myroms.org/)) is an open source hydrodynamic model that is used for simulating currents and water properties in coastal and estuarine regions. ROMS is one of a few standard ocean models, and it has an active user community.\n", "\n", "ROMS uses a regular C-Grid in the horizontal, similar to other structured grid ocean and atmospheric models, and a stretched vertical coordinate (see [the ROMS documentation](https://www.myroms.org/wiki/Vertical_S-coordinate) for more details). Both of these require special treatment when using `xarray` to analyze ROMS ocean model output. This example notebook shows how to create a lazily evaluated vertical coordinate, and make some basic plots. The `xgcm` package is required to do analysis that is aware of the horizontal C-Grid." ] diff --git a/doc/examples/multidimensional-coords.ipynb b/doc/examples/multidimensional-coords.ipynb index a138dff15aa..8ace13f7e69 100644 --- a/doc/examples/multidimensional-coords.ipynb +++ b/doc/examples/multidimensional-coords.ipynb @@ -126,7 +126,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "In order to visualize the data on a conventional latitude-longitude grid, we can take advantage of xarray's ability to apply [cartopy](http://scitools.org.uk/cartopy/index.html) map projections." + "In order to visualize the data on a conventional latitude-longitude grid, we can take advantage of xarray's ability to apply [cartopy](https://scitools.org.uk/cartopy/docs/latest/) map projections." ] }, { diff --git a/doc/getting-started-guide/why-xarray.rst b/doc/getting-started-guide/why-xarray.rst index d7956817c03..0dc3586fc34 100644 --- a/doc/getting-started-guide/why-xarray.rst +++ b/doc/getting-started-guide/why-xarray.rst @@ -106,10 +106,10 @@ under active development. See our technical :ref:`roadmap` for more details, and feel free to reach out with questions about whether xarray is the right tool for your needs. -.. _datarray: https://github.com/fperez/datarray -.. _Dask: http://dask.org -.. _matplotlib: http://matplotlib.org -.. _netCDF: http://www.unidata.ucar.edu/software/netcdf -.. _NumPy: http://www.numpy.org -.. _pandas: http://pandas.pydata.org -.. _SciPy: http://www.scipy.org +.. _datarray: https://github.com/BIDS/datarray +.. _Dask: https://www.dask.org +.. _matplotlib: https://matplotlib.org +.. _netCDF: https://www.unidata.ucar.edu/software/netcdf +.. _NumPy: https://numpy.org +.. _pandas: https://pandas.pydata.org +.. _SciPy: https://www.scipy.org diff --git a/doc/roadmap.rst b/doc/roadmap.rst index c065a76a925..41f2e972f4d 100644 --- a/doc/roadmap.rst +++ b/doc/roadmap.rst @@ -148,7 +148,7 @@ implementations, e.g.: - Other ndarray objects, e.g., sparse, xnd, xtensor. Our strategy has been to pursue upstream improvements in NumPy (see -`NEP-22 `__) +`NEP-22 `__) for supporting a complete duck-typing interface using with NumPy's higher level array API. Improvements in NumPy's support for custom data types would also be highly useful for xarray users. diff --git a/doc/user-guide/dask.rst b/doc/user-guide/dask.rst index 5c421aa51d8..bc4aaa61c68 100644 --- a/doc/user-guide/dask.rst +++ b/doc/user-guide/dask.rst @@ -13,7 +13,7 @@ dependency in a future version of xarray. For a full example of how to use xarray's Dask integration, read the `blog post introducing xarray and Dask`_. More up-to-date examples -may be found at the `Pangeo project's gallery `_ +may be found at the `Pangeo project's gallery `_ and at the `Dask examples website `_. .. _blog post introducing xarray and Dask: https://stephanhoyer.com/2015/06/11/xray-dask-out-of-core-labeled-arrays/ diff --git a/doc/user-guide/io.rst b/doc/user-guide/io.rst index f4b3e5ab9f6..7175933dcbc 100644 --- a/doc/user-guide/io.rst +++ b/doc/user-guide/io.rst @@ -275,7 +275,7 @@ to automatically decode the values in the netCDF objects according to has an invalid "units" or "calendar" attribute. For these cases, you can turn this decoding off manually. -.. _CF conventions: http://cfconventions.org/ +.. _CF conventions: https://cfconventions.org/ You can view this encoding information (among others) in the :py:attr:`DataArray.encoding` and @@ -343,8 +343,8 @@ See its docstring for more details. (``compat='override'``). -.. _dask: http://dask.org -.. _blog post: http://stephanhoyer.com/2015/06/11/xray-dask-out-of-core-labeled-arrays/ +.. _dask: https://www.dask.org +.. _blog post: https://stephanhoyer.com/2015/06/11/xray-dask-out-of-core-labeled-arrays/ Sometimes multi-file datasets are not conveniently organized for easy use of :py:func:`open_mfdataset`. One can use the ``preprocess`` argument to provide a function that takes a dataset @@ -496,7 +496,7 @@ If character arrays are used: Technically, you can use `any string encoding recognized by Python `_ if you feel the need to deviate from UTF-8, by setting the ``_Encoding`` field in ``encoding``. But - `we don't recommend it `_. + `we don't recommend it `_. - The character dimension name can be specified by the ``char_dim_name`` field of a variable's ``encoding``. If the name of the character dimension is not specified, the default is ``f'string{data.shape[-1]}'``. When decoding character arrays from existing files, the @@ -1395,7 +1395,7 @@ For CSV files, one might also consider `xarray_extras`_. .. _xarray_extras: https://xarray-extras.readthedocs.io/en/latest/api/csv.html -.. _IO tools: http://pandas.pydata.org/pandas-docs/stable/io.html +.. _IO tools: https://pandas.pydata.org/pandas-docs/stable/user_guide/io.html Third party libraries diff --git a/xarray/backends/zarr.py b/xarray/backends/zarr.py index 030395b26fb..fcbf1f8c4a0 100644 --- a/xarray/backends/zarr.py +++ b/xarray/backends/zarr.py @@ -250,9 +250,9 @@ def _determine_zarr_chunks( # if there are no chunks in encoding but there are dask chunks, we try to # use the same chunks in zarr # However, zarr chunks needs to be uniform for each array - # http://zarr.readthedocs.io/en/latest/spec/v1.html#chunks + # https://zarr-specs.readthedocs.io/en/latest/v2/v2.0.html#chunks # while dask chunks can be variable sized - # http://dask.pydata.org/en/latest/array-design.html#chunks + # https://dask.pydata.org/en/latest/array-design.html#chunks if var_chunks and not enc_chunks: if any(len(set(chunks[:-1])) > 1 for chunks in var_chunks): raise ValueError( @@ -1377,7 +1377,7 @@ def open_zarr( References ---------- - http://zarr.readthedocs.io/ + https://zarr.readthedocs.io/ """ from xarray.backends.api import open_dataset diff --git a/xarray/coding/strings.py b/xarray/coding/strings.py index d16ec52d645..4ca6a3f0a46 100644 --- a/xarray/coding/strings.py +++ b/xarray/coding/strings.py @@ -210,7 +210,7 @@ def _numpy_char_to_bytes(arr): # see https://github.com/numpy/numpy/issues/25916 # and https://github.com/numpy/numpy/pull/25922 copy = None if HAS_NUMPY_2_0 else False - # based on: http://stackoverflow.com/a/10984878/809705 + # based on: https://stackoverflow.com/a/10984878/809705 arr = np.array(arr, copy=copy, order="C") dtype = "S" + str(arr.shape[-1]) return arr.view(dtype).reshape(arr.shape[:-1]) diff --git a/xarray/core/common.py b/xarray/core/common.py index 6966b1723d3..6f788f408d0 100644 --- a/xarray/core/common.py +++ b/xarray/core/common.py @@ -352,7 +352,7 @@ def __dir__(self) -> list[str]: def _ipython_key_completions_(self) -> list[str]: """Provide method for the key-autocompletions in IPython. - See http://ipython.readthedocs.io/en/stable/config/integrating.html#tab-completion + See https://ipython.readthedocs.io/en/stable/config/integrating.html#tab-completion For the details. """ items = { diff --git a/xarray/core/dataarray.py b/xarray/core/dataarray.py index 171fa58201a..52ce2463d51 100644 --- a/xarray/core/dataarray.py +++ b/xarray/core/dataarray.py @@ -6991,7 +6991,7 @@ def groupby_bins( References ---------- - .. [1] http://pandas.pydata.org/pandas-docs/stable/generated/pandas.cut.html + .. [1] https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.cut.html """ from xarray.core.groupby import ( DataArrayGroupBy, @@ -7484,7 +7484,7 @@ def resample( References ---------- - .. [1] http://pandas.pydata.org/pandas-docs/stable/timeseries.html#offset-aliases + .. [1] https://pandas.pydata.org/pandas-docs/stable/user_guide/timeseries.html#offset-aliases """ from xarray.core.resample import DataArrayResample diff --git a/xarray/core/dataset.py b/xarray/core/dataset.py index 98c799ed0cf..a09a857e331 100644 --- a/xarray/core/dataset.py +++ b/xarray/core/dataset.py @@ -10584,7 +10584,7 @@ def groupby_bins( References ---------- - .. [1] http://pandas.pydata.org/pandas-docs/stable/generated/pandas.cut.html + .. [1] https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.cut.html """ from xarray.core.groupby import ( DatasetGroupBy, @@ -10850,7 +10850,7 @@ def resample( References ---------- - .. [1] http://pandas.pydata.org/pandas-docs/stable/timeseries.html#offset-aliases + .. [1] https://pandas.pydata.org/pandas-docs/stable/user_guide/timeseries.html#offset-aliases """ from xarray.core.resample import DatasetResample diff --git a/xarray/core/datatree.py b/xarray/core/datatree.py index 6d673389e05..ee90cf7477c 100644 --- a/xarray/core/datatree.py +++ b/xarray/core/datatree.py @@ -749,7 +749,7 @@ def _item_sources(self) -> Iterable[Mapping[Any, Any]]: def _ipython_key_completions_(self) -> list[str]: """Provide method for the key-autocompletions in IPython. - See http://ipython.readthedocs.io/en/stable/config/integrating.html#tab-completion + See https://ipython.readthedocs.io/en/stable/config/integrating.html#tab-completion For the details. """ diff --git a/xarray/tests/test_groupby.py b/xarray/tests/test_groupby.py index 88b8afa07fe..3fc7fcac132 100644 --- a/xarray/tests/test_groupby.py +++ b/xarray/tests/test_groupby.py @@ -190,7 +190,7 @@ def test_groupby_da_datetime() -> None: def test_groupby_duplicate_coordinate_labels() -> None: - # fix for http://stackoverflow.com/questions/38065129 + # fix for https://stackoverflow.com/questions/38065129 array = xr.DataArray([1, 2, 3], [("x", [1, 1, 2])]) expected = xr.DataArray([3, 3], [("x", [1, 2])]) actual = array.groupby("x").sum() @@ -1632,7 +1632,7 @@ def test_groupby_bins( # the first value should not be part of any group ("right" binning) array[0] = 99 # bins follow conventions for pandas.cut - # http://pandas.pydata.org/pandas-docs/stable/generated/pandas.cut.html + # https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.cut.html bins = [0, 1.5, 5] df = array.to_dataframe() @@ -1923,7 +1923,7 @@ def test_resample_first(self) -> None: expected = DataArray([np.nan, 4, 8], [("time", times[::4])]) assert_identical(expected, actual) - # regression test for http://stackoverflow.com/questions/33158558/ + # regression test for https://stackoverflow.com/questions/33158558/ array = Dataset({"time": times})["time"] actual = array.resample(time="1D").last() expected_times = pd.to_datetime(