From 3525298353b28cc58e7cdde612612dd9dc9ef651 Mon Sep 17 00:00:00 2001 From: Josh Borrow Date: Thu, 12 Sep 2024 08:38:21 -0400 Subject: [PATCH] More old-style type hinting --- swiftsimio/visualisation/volume_render.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/swiftsimio/visualisation/volume_render.py b/swiftsimio/visualisation/volume_render.py index 47fb9a1c..74e212d1 100644 --- a/swiftsimio/visualisation/volume_render.py +++ b/swiftsimio/visualisation/volume_render.py @@ -3,7 +3,7 @@ of the particles and projects them onto a grid. """ -from typing import Literal, Union +from typing import List, Literal, Union from math import sqrt, exp, pi from numpy import ( float64, @@ -881,12 +881,12 @@ def render_voxel_to_array(data, center, width): def visualise_render( render: ndarray, - centers: list[float], - widths: Union[list[float], float], + centers: List[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[Union[list[ndarray], ndarray], list["plt.Normalize"]]: + norm: Union[List["plt.Normalize"], "plt.Normalize", None] = None, +) -> 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: Union[list[float], float], cmap: str = "viridis" + centers: List[float], widths: Union[List[float], float], cmap: str = "viridis" ) -> tuple["plt.Figure", "plt.Axes"]: """ Creates a figure of your rendering options. The y-axis is the output value