From 22029107658bd99f51bda53ef1f8ed5e65965d12 Mon Sep 17 00:00:00 2001 From: Niko Aarnio Date: Fri, 12 Jan 2024 10:09:06 +0200 Subject: [PATCH] Fix typing for ALR transform --- eis_toolkit/transformations/coda/alr.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/eis_toolkit/transformations/coda/alr.py b/eis_toolkit/transformations/coda/alr.py index dd1008d2..ab880c8c 100644 --- a/eis_toolkit/transformations/coda/alr.py +++ b/eis_toolkit/transformations/coda/alr.py @@ -3,7 +3,7 @@ import numpy as np import pandas as pd from beartype import beartype -from beartype.typing import Sequence +from beartype.typing import Optional, Sequence from eis_toolkit.exceptions import InvalidColumnException, NumericValueSignException from eis_toolkit.utilities.aitchison_geometry import _closure @@ -19,7 +19,9 @@ def _alr_transform(df: pd.DataFrame, columns: Sequence[str], denominator_column: @beartype -def alr_transform(df: pd.DataFrame, column: str = None, keep_denominator_column: bool = False) -> pd.DataFrame: +def alr_transform( + df: pd.DataFrame, column: Optional[str] = None, keep_denominator_column: bool = False +) -> pd.DataFrame: """ Perform an additive logratio transformation on the data.