Skip to content

Commit

Permalink
Merge pull request #847 from Vinc0110/sweeptype_rtol
Browse files Browse the repository at this point in the history
Increasing rtol for sweep type tests
  • Loading branch information
jhillairet committed Feb 14, 2023
2 parents 466cb6e + 5f24fe6 commit da8ef58
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions skrf/frequency.py
Original file line number Diff line number Diff line change
Expand Up @@ -697,9 +697,9 @@ def sweep_type(self) -> str:
'lin' if linearly increasing, 'log' or 'unknown'.
"""
if npy.allclose(self.f, linspace(self.f[0], self.f[-1], self.npoints)):
if npy.allclose(self.f, linspace(self.f[0], self.f[-1], self.npoints), rtol=0.05):
sweep_type = 'lin'
elif self.f[0] and npy.allclose(self.f, geomspace(self.f[0], self.f[-1], self.npoints)):
elif self.f[0] and npy.allclose(self.f, geomspace(self.f[0], self.f[-1], self.npoints), rtol=0.05):
sweep_type = 'log'
else:
sweep_type = 'unknown'
Expand Down

0 comments on commit da8ef58

Please sign in to comment.