From 41feff594d845dd4c1d1d900d7caa6b9dbe51423 Mon Sep 17 00:00:00 2001 From: Loic Coyle Date: Mon, 24 Jun 2024 18:40:28 +0200 Subject: [PATCH] fix(mosaic): drop Literal typing --- phomo/mosaic.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/phomo/mosaic.py b/phomo/mosaic.py index 344cc9b..baad44e 100644 --- a/phomo/mosaic.py +++ b/phomo/mosaic.py @@ -2,7 +2,7 @@ import math from functools import partial from multiprocessing.pool import Pool as MpPool -from typing import Literal, Tuple, Union +from typing import Tuple, Union import numpy as np from PIL import Image @@ -145,9 +145,7 @@ def d_matrix( self._log.debug("d_matrix shape: %s", d_matrix.shape) return d_matrix - def d_matrix_cuda( - self, metric: Literal["norm"] | Literal["greyscale"] = "norm" - ) -> np.ndarray: + def d_matrix_cuda(self, metric: str = "norm") -> np.ndarray: """Compute the distance matrix using CUDA for GPU acceleration. Args: