Skip to content

Commit

Permalink
Fix typing for ALR transform
Browse files Browse the repository at this point in the history
  • Loading branch information
nmaarnio committed Jan 12, 2024
1 parent da3b096 commit 2202910
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions eis_toolkit/transformations/coda/alr.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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.
Expand Down

0 comments on commit 2202910

Please sign in to comment.