def rfftfreq(n, d=1.0):
 if ((not isinstance(n, int)) or (n < 0)):
  raise ValueError(('n = %s is not valid. n must be a nonnegative integer.' % n))
 return ((arange(1, (n + 1), dtype=int) // 2) / float((n * d)))

def rfftfreq ( n , d = 1.0 ) : if ( ( not isinstance ( n , int ) ) or ( n < 0 ) ) : raise ValueError ( ( 'n = %s is not valid. n must be a nonnegative integer.' % n ) ) return ( ( arange ( 1 , ( n + 1 ) , dtype = int ) // 2 ) / float ( ( n * d ) ) )
dft sample frequencies .