Skip to content

Commit

Permalink
v2.0.4: fix min_max error
Browse files Browse the repository at this point in the history
  • Loading branch information
luohancfd committed Jun 26, 2024
1 parent 8cab8ad commit 8ba6acf
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "tecio"
version = "2.0.3"
version = "2.0.4"
authors = [
{ name="Han Luo", email="6806720+luohancfd@users.noreply.github.com" },
]
Expand Down
8 changes: 4 additions & 4 deletions tecio/tecio.py
Original file line number Diff line number Diff line change
Expand Up @@ -990,7 +990,7 @@ def gen_data_struct(variables: list[str], zone: Union[dict, construct.Container]
zone = construct.Container(**zone)
nvar = len(variables)
tmp = gen_zone_struct(nvar)
zone = tmp.parse(tmp.build(zone)) # ensure there is no missing values in zone
zone = tmp.parse(tmp.build(zone)) # ensure there is no missing values in zone
return Struct(
"offset_start" / Tell,
Const(Float.build(299.0)),
Expand Down Expand Up @@ -1154,7 +1154,7 @@ def get_connect(self, izone: int, start_from=0):
return None
elif self.data[izone].shared_connectivity == -1:
if start_from != 0:
return [[j+1 for j in i] for i in self.data[izone].connect]
return [[j + 1 for j in i] for i in self.data[izone].connect]
return [[j for j in i] for i in self.data[izone].connect]
else:
return self.get_connect(self.data[izone].shared_connectivity)
Expand Down Expand Up @@ -1227,10 +1227,10 @@ def get_solution_time(self, izone: int) -> float:
return self.zones[izone].solution_time

def get_min(self, izone: int, ivar: int) -> Union[int, float]:
return self.data[izone].data[ivar].min
return self.data[izone].min_max[ivar][0]

def get_max(self, izone: int, ivar: int) -> Union[int, float]:
return self.data[izone].data[ivar].max
return self.data[izone].min_max[ivar][1]

def get_dataset_aux(self, name):
if self.has_dataset_aux:
Expand Down

0 comments on commit 8ba6acf

Please sign in to comment.