Test sphinx codeautolink method chaining#
Numpy#
https://numpy.org/doc/stable/reference/generated/numpy.array.html
https://numpy.org/doc/stable/reference/generated/numpy.mean.html
np.float64(2.5)
# Another workaround is to type hint and split on multiple lines
a: np.ndarray = np.array([[1, 2], [3, 4]])
a.mean()
np.float64(2.5)
import numpy
numpy.array([[1, 2], [3, 4]]).mean()
np.float64(2.5)
Xarray#
https://docs.xarray.dev/en/stable/generated/xarray.DataArray.isel.html
https://docs.xarray.dev/en/stable/generated/xarray.DataArray.mean.html
import xarray as xr
da = xr.DataArray(a, dims=["x","y"])
da
<xarray.DataArray (x: 2, y: 2)> Size: 32B array([[1, 2], [3, 4]]) Dimensions without coordinates: x, y
da.isel(x=0).mean()
<xarray.DataArray ()> Size: 8B array(1.5)
Pandas#
https://pandas.pydata.org/docs/user_guide/10min.html
https://pandas.pydata.org/docs/reference/api/pandas.Series.html
https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.mean.html
import pandas as pd