Closed murphyqm closed 3 years ago
Getting linting error for "new_crit_depth.py" for the line radii_index = int(((d_val)[crossing == True]))
radii_index = int(((d_val)[crossing == True]))
error output: E712 comparison to True should be 'if cond is True:' or 'if cond:'
E712 comparison to True should be 'if cond is True:' or 'if cond:'
However, in the context, an if statement does not work. Have tried (failed pytest):
if
radii_index = int(((d_val)[np.where(crossing)]))
radii_index = int(((d_val)[crossing]))
Fixed by replacing crossing == True with crossing is True
crossing == True
crossing is True
Getting linting error for "new_crit_depth.py" for the line
radii_index = int(((d_val)[crossing == True]))
error output:
E712 comparison to True should be 'if cond is True:' or 'if cond:'
However, in the context, an
if
statement does not work. Have tried (failed pytest):radii_index = int(((d_val)[np.where(crossing)]))
radii_index = int(((d_val)[crossing]))
- index cannot be a list error