def _logn(n, x, out=None):
 if (out is None):
  return (np.log(x) / np.log(n))
 else:
  np.log(x, out=out)
  np.true_divide(out, np.log(n), out=out)
  return out

def _logn ( n , x , out = None ) : if ( out is None ) : return ( np . log ( x ) / np . log ( n ) ) else : np . log ( x , out = out ) np . true_divide ( out , np . log ( n ) , out = out ) return out
calculate the log base n of x .