Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Formatting and linting fixes #77

Merged
merged 19 commits into from
Apr 2, 2021
Merged
12 changes: 8 additions & 4 deletions pygeo/DVGeometry.py
Original file line number Diff line number Diff line change
Expand Up @@ -2832,7 +2832,8 @@ def _finalize(self):
for j in range(self.FFD.vols[iVol].nCtlv):
for k in range(self.FFD.vols[iVol].nCtlw):
ind = self.FFD.topo.lIndex[iVol][i, j, k]
if coefMask[ind] == False and ind not in self.axis[key]["ignoreInd"]:
# we have to cast to bool to compare using "is"
ewu63 marked this conversation as resolved.
Show resolved Hide resolved
if bool(coefMask[ind]) is False and ind not in self.axis[key]["ignoreInd"]:
temp.append(ind)

# Unique the values and append to the master list
Expand Down Expand Up @@ -4278,7 +4279,8 @@ def __init__(self, dvName, lower, upper, scale, axis, coefListIn, mask, config):
coefList = []
# create a new coefficent list that excludes any values that are masked
for i in range(len(coefListIn)):
if mask[coefListIn[i]] == False:
# we have to cast to bool to compare using "is"
if bool(mask[coefListIn[i]]) is False:
coefList.append(coefListIn[i])

N = len(axis)
Expand Down Expand Up @@ -4389,7 +4391,8 @@ def __init__(self, dvName, lower, upper, scale, axis, vol_dv_to_coefs, mask, con

# loop through each of coefs to see if it is masked
for coef in coefs:
if mask[coef] == False:
# we have to cast to bool to compare using "is"
if bool(mask[coef]) is False:
loc_dv_to_coefs.append(coef)

self.dv_to_coefs.append(loc_dv_to_coefs)
Expand Down Expand Up @@ -4473,7 +4476,8 @@ def __init__(self, dvName, lower, upper, scale, axis, coefListIn, mask, config,
self.coefList = []
# create a new coefficent list that excludes any values that are masked
for i in range(len(coefListIn)):
if mask[coefListIn[i]] == False:
# we have to cast to bool to compare using "is"
if bool(mask[coefListIn[i]]) is False:
self.coefList.append(coefListIn[i])

self.nVal = len(self.coefList)
Expand Down