About 132,000 results
Open links in new tab
  1. Exponentials in python: x**y vs math.pow(x, y) - Stack Overflow

    Jan 7, 2014 · 8 Just for the protocol: The ** operator is equivalent to the two-argument version of the built-in pow function, the pow function accepts an optional third argument (modulus) if the …

  2. What does the power operator (**) in Python translate into?

    Jan 12, 2022 · The power operator has the same semantics as the built-in pow() function, when called with two arguments: it yields its left argument raised to the power of its right argument. …

  3. Difference between the built-in pow () and math.pow () for floats, …

    Apr 23, 2012 · Good answer. FWIW, in the CPython source code, the built-in pow function calls PyNumber_Power, which calls __pow__ on the object in question. For example, see the …

  4. python - How can I use "e" (Euler's number) and power operation ...

    Aug 25, 2016 · How can I write 1-e^ (-value1^2/2*value2^2) in Python? I don't know how to use power operator and e.

  5. python - How to square or raise to a power (elementwise) a 2D …

    Sep 16, 2014 · The fastest way is to do a*a or a**2 or np.square(a) whereas np.power(a, 2) showed to be considerably slower. np.power() allows you to use different exponents for each …

  6. python - Recursive Power Function Step - Stack Overflow

    May 23, 2015 · Done. call the power function and print its returned value. Can do. The recursive power function, power (base,exponent), must recursively calculate the value of the power and …

  7. numpy - Plotting power spectrum in python - Stack Overflow

    Numpy has a convenience function, np.fft.fftfreq to compute the frequencies associated with FFT components: from __future__ import division import numpy as np import matplotlib.pyplot as …

  8. python - How to get all subsets of a set? (powerset) - Stack Overflow

    @X10D Asking what are the applications of a power set is a bit like asking what are the applications of subsets. It is a fundamental mathematical concept. What to use it for is up to …

  9. How to do power curve fitting in Python? - Stack Overflow

    Sep 21, 2016 · There is a question about exponential curve fitting, but I didn't find any materials on how to create a power curve fitting, like this: y = a*x^b There is a way to do this in Excel, …

  10. python - Fitting a curve to a power-law distribution with curve_fit ...

    Dec 13, 2016 · I am trying to find a curve fitting my data that visually seem to have a power law distribution. I hoped to utilize scipy.optimize.curve_fit, but no matter what function or data …