Skip to content

Commit 8267ab3

Browse files
xroynardfabiencasenave
authored andcommitted
fix name formatting in src/plaid/containers/sample.py
1 parent 71ca7c5 commit 8267ab3

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

src/plaid/containers/sample.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ def show_cgns_tree(tree: list, offset: str =''):
146146
"""A TimeSeriesType is a tuple[TimeSequenceType,FieldType]
147147
"""
148148

149-
def ReadIndex(pyTree: list, dim: list[int]):
149+
def read_index(pyTree: list, dim: list[int]):
150150
"""Read Index Array or Index Range from CGNS
151151
152152
Args:
@@ -156,11 +156,11 @@ def ReadIndex(pyTree: list, dim: list[int]):
156156
Returns:
157157
indices
158158
"""
159-
a = ReadIndexArray(pyTree)
160-
b = ReadIndexRange(pyTree, dim)
159+
a = read_index_array(pyTree)
160+
b = read_index_range(pyTree, dim)
161161
return np.hstack((a, b))
162162

163-
def ReadIndexArray(pyTree: list):
163+
def read_index_array(pyTree: list):
164164
"""Read Index Array from CGNS
165165
166166
Args:
@@ -179,7 +179,7 @@ def ReadIndexArray(pyTree: list):
179179
res.extend(data[1].ravel())
180180
return np.array(res, dtype=int).ravel()
181181

182-
def ReadIndexRange(pyTree: list, dim: list[int]):
182+
def read_index_range(pyTree: list, dim: list[int]):
183183
"""Read Index Range from CGNS
184184
185185
Args:
@@ -1246,7 +1246,7 @@ def get_nodal_tags(self, zone_name: str = None, base_name: str = None,
12461246
for BCPath in BCPaths:
12471247
BCNode = CGU.getNodeByPath(zone_node, BCPath)
12481248
BCName = BCNode[0]
1249-
indices = ReadIndex(BCNode, dim)
1249+
indices = read_index(BCNode, dim)
12501250
if len(indices) == 0:
12511251
continue
12521252

@@ -1265,7 +1265,7 @@ def get_nodal_tags(self, zone_name: str = None, base_name: str = None,
12651265
if fnpath:
12661266
fn = CGU.getNodeByPath(ZSRNode, fnpath[0])
12671267
familyName = CGU.getValueAsString(fn)
1268-
indices = ReadIndex(ZSRNode, dim)
1268+
indices = read_index(ZSRNode, dim)
12691269
if len(indices) == 0:
12701270
continue
12711271
gl = CGU.getPathsByTypeSet(ZSRNode, ["GridLocation_t"])[0]

0 commit comments

Comments
 (0)