Skip to content

Commit

Permalink
Merge pull request #151 from jGaboardi/round_sig
Browse files Browse the repository at this point in the history
correcting list comp syntax in _round_sig
  • Loading branch information
jGaboardi committed Nov 21, 2018
2 parents 8586432 + 6ec5af3 commit 9c8c138
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions spaghetti/network.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,11 +145,10 @@ def _round_sig(self, v):
sig = self.node_sig
if sig is None:
return v
out_v = [val if 0
else round(val, -int(np.floor(np.log10(np.fabs(val)))) +
(sig - 1))
out_v = [val if val == 0 \
else round(val, -int(np.floor(np.log10(np.fabs(val))))\
+ (sig - 1))\
for val in v]

return tuple(out_v)


Expand Down

0 comments on commit 9c8c138

Please sign in to comment.