npoints is an integer of course
@@ -80,7 +80,7 @@ class Frequency(object):
}
- def __init__(self, start: float = 0, stop: float = 0, npoints: float = 0,
+ def __init__(self, start: float = 0, stop: float = 0, npoints: int = 0,
unit: str = 'ghz', sweep_type: str = 'lin') -> None:
'''
Frequency initializer.
@@ -352,7 +352,7 @@ class Frequency(object):
'''
closes idx of :attr:`f` to the center frequency
'''
- return int(self.npoints)/2
+ return self.npoints // 2
@property
def center_scaled(self) -> float:
