diff --git a/docs/examples/example_010_custom_interpolations.ipynb b/docs/examples/example_010_custom_interpolations.ipynb index 8064f5f..431421d 100644 --- a/docs/examples/example_010_custom_interpolations.ipynb +++ b/docs/examples/example_010_custom_interpolations.ipynb @@ -39,6 +39,7 @@ ], "source": [ "import numpy as np \n", + "import numpy.typing as npt\n", "import xarray as xr\n", "import yt_xarray\n", "from yt_xarray.transformations import GeocentricCartesian, build_interpolated_cartesian_ds\n", @@ -68,7 +69,7 @@ "outputs": [], "source": [ "def my_interp(data: xr.DataArray = None, \n", - " coords: List[np.ndarray] = None) -> np.ndarray:\n", + " coords: List[npt.NDArray] = None) -> npt.NDArray:\n", " print(\"hello from my_interp!\")\n", " c0 = coords[0] # altitude \n", " c1 = coords[1] # latitude\n", @@ -484,66 +485,66 @@ " * latitude (latitude) float64 0.0 1.429 2.857 4.286 ... 17.14 18.57 20.0\n", " * longitude (longitude) float64 10.0 10.91 11.82 12.73 ... 18.18 19.09 20.0\n", "Data variables:\n", - " field1 (altitude, latitude, longitude) float64 0.7245 0.6122 ... 0.4968\n", + " field1 (altitude, latitude, longitude) float64 0.9765 0.4326 ... 0.01994\n", "Attributes:\n", - " geospatial_vertical_units: m
  • geospatial_vertical_units :
    m
  • " ], "text/plain": [ "\n", @@ -553,7 +554,7 @@ " * latitude (latitude) float64 0.0 1.429 2.857 4.286 ... 17.14 18.57 20.0\n", " * longitude (longitude) float64 10.0 10.91 11.82 12.73 ... 18.18 19.09 20.0\n", "Data variables:\n", - " field1 (altitude, latitude, longitude) float64 0.7245 0.6122 ... 0.4968\n", + " field1 (altitude, latitude, longitude) float64 0.9765 0.4326 ... 0.01994\n", "Attributes:\n", " geospatial_vertical_units: m" ] @@ -585,12 +586,12 @@ "name": "stderr", "output_type": "stream", "text": [ - "yt_xarray : [INFO ] 2024-05-21 14:36:30,413: Interpolation function provided, switching interp_method to 'interpolate'.\n", - "yt : [INFO ] 2024-05-21 14:36:30,485 Parameters: current_time = 0.0\n", - "yt : [INFO ] 2024-05-21 14:36:30,485 Parameters: domain_dimensions = [128 128 128]\n", - "yt : [INFO ] 2024-05-21 14:36:30,486 Parameters: domain_left_edge = [5625. 1039. 0.]\n", - "yt : [INFO ] 2024-05-21 14:36:30,487 Parameters: domain_right_edge = [8244. 2864. 2864.]\n", - "yt : [INFO ] 2024-05-21 14:36:30,487 Parameters: cosmological_simulation = 0\n" + "yt_xarray : [INFO ] 2025-11-05 16:25:34,716: Interpolation function provided, switching interp_method to 'interpolate'.\n", + "yt : [INFO ] 2025-11-05 16:25:34,855 Parameters: current_time = 0.0\n", + "yt : [INFO ] 2025-11-05 16:25:34,856 Parameters: domain_dimensions = [128 128 128]\n", + "yt : [INFO ] 2025-11-05 16:25:34,856 Parameters: domain_left_edge = [5625. 1039. 0.]\n", + "yt : [INFO ] 2025-11-05 16:25:34,857 Parameters: domain_right_edge = [8244. 2864. 2864.]\n", + "yt : [INFO ] 2025-11-05 16:25:34,858 Parameters: cosmological_simulation = 0\n" ] } ], @@ -620,20 +621,20 @@ "name": "stderr", "output_type": "stream", "text": [ - "yt : [INFO ] 2024-05-21 14:36:30,971 xlim = 5625.000000 8244.000000\n", - "yt : [INFO ] 2024-05-21 14:36:30,972 ylim = 1039.000000 2864.000000\n", - "yt : [INFO ] 2024-05-21 14:36:30,974 xlim = 5625.000000 8244.000000\n", - "yt : [INFO ] 2024-05-21 14:36:30,975 ylim = 1039.000000 2864.000000\n", - "yt : [INFO ] 2024-05-21 14:36:30,981 Making a fixed resolution buffer of (('stream', 'field1')) 800 by 800\n" + "yt : [INFO ] 2025-11-05 16:25:36,230 xlim = 5625.000000 8244.000000\n", + "yt : [INFO ] 2025-11-05 16:25:36,230 ylim = 1039.000000 2864.000000\n", + "yt : [INFO ] 2025-11-05 16:25:36,232 xlim = 5625.000000 8244.000000\n", + "yt : [INFO ] 2025-11-05 16:25:36,233 ylim = 1039.000000 2864.000000\n", + "yt : [INFO ] 2025-11-05 16:25:36,239 Making a fixed resolution buffer of (('stream', 'field1')) 800 by 800\n" ] }, { "data": { "text/html": [ - "
    " + "
    " ], "text/plain": [ - "" + "" ] }, "execution_count": 6,