From 6702112d4a3159418302b16e4302e45d4b53fb5f Mon Sep 17 00:00:00 2001 From: Josh Borrow Date: Wed, 11 Sep 2024 17:32:50 -0400 Subject: [PATCH] Old-style type hints --- swiftsimio/visualisation/volume_render.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/swiftsimio/visualisation/volume_render.py b/swiftsimio/visualisation/volume_render.py index 299a5e68..55b99201 100644 --- a/swiftsimio/visualisation/volume_render.py +++ b/swiftsimio/visualisation/volume_render.py @@ -882,11 +882,11 @@ def render_voxel_to_array(data, center, width): def visualise_render( render: ndarray, centers: list[float], - widths: list[float] | float, + widths: Union[list[float], float], cmap: str = "viridis", return_type: Literal["all", "lighten", "add"] = "lighten", norm: Union[list["plt.Normalize"], "plt.Normalize", None] = None, -) -> tuple[list[ndarray] | ndarray, list["plt.Normalize"]]: +) -> tuple[Union[list[ndarray], ndarray], list["plt.Normalize"]]: """ Visualises a render with multiple centers and widths. @@ -961,7 +961,7 @@ def visualise_render( def visualise_render_options( centers: list[float], - widths: list[float] | float, + widths: Union[list[float], float], cmap: str = "viridis", ) -> tuple["plt.Figure", "plt.Axes"]: """