Merge pull request #33 from tboudreaux/fix/opatIndexError

fix(opatio): fixed global numTables
This commit is contained in:
2025-03-22 07:19:18 -04:00
committed by GitHub

View File

@@ -48,7 +48,12 @@ class OPATTable:
logT: Iterable[float] #< Logarithm of T values logT: Iterable[float] #< Logarithm of T values
logKappa: Iterable[Iterable[float]] #< Logarithm of Kappa values logKappa: Iterable[Iterable[float]] #< Logarithm of Kappa values
defaultHeader = Header( def make_default_header() -> Header:
"""
@brief Create a default header for an OPAT file.
@return The default header.
"""
return Header(
magic="OPAT", magic="OPAT",
version=1, version=1,
numTables=0, numTables=0,
@@ -103,7 +108,7 @@ class OpatIO:
Save the OPAT file as a binary file. Save the OPAT file as a binary file.
""" """
def __init__(self): def __init__(self):
self.header: Header = defaultHeader self.header: Header = make_default_header()
self.tables: List[Tuple[Tuple[float, float], OPATTable]] = [] self.tables: List[Tuple[Tuple[float, float], OPATTable]] = []
@staticmethod @staticmethod