Skip to content

Commit

Permalink
Fix TypeAlias declaration for Float64Array in matrices.py (#125)
Browse files Browse the repository at this point in the history
* fix: Correct TypeAlias declaration for Float64Array in matrices.py

* fix: Update TypeAlias import for compatibility and correct typo in T_3_1_states docstring
  • Loading branch information
Anselmoo authored Oct 23, 2024
1 parent 19b791d commit 220b1da
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions tanabesugano/matrices.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
from __future__ import annotations

from typing import Dict
# from typing import TypeAlias


try:
from typing import TypeAlias
except ImportError:
from typing import Any as TypeAlias

import numpy as np

Expand All @@ -19,8 +24,7 @@
_3sqrt3 = _sqrt3 * 3.0
_3sqrt6 = _sqrt6 * 3.0

# Float64Array: TypeAlias = NDArray[np.float64]
Float64Array = NDArray[np.float64]
Float64Array: TypeAlias = NDArray[np.float64]


class LigandFieldTheory:
Expand Down Expand Up @@ -332,7 +336,7 @@ def __init__(self, Dq: float = 0.0, B: float = 965.0, C: float = 4449.0) -> None
super().__init__(Dq, B, C)

def T_3_1_states(self) -> Float64Array:
"""Calculate the T_3_1 states."""
"""Calculatee the T_3_1 states."""
# Diagonal elements
AA = -16 * self.Dq - 15 * self.B + 5 * self.C
BB = -6 * self.Dq - 11 * self.B + 4 * self.C
Expand Down

0 comments on commit 220b1da

Please sign in to comment.