About 165,000 results
Open links in new tab
  1. How do I calculate square root in Python? - Stack Overflow

    Jan 20, 2022 · Python sqrt limit for very large numbers? square root of a number greater than 10^2000 in Python 3 Which is faster in Python: x**.5 or math.sqrt (x)? Why does Python give …

  2. Is there a short-hand for nth root of x in Python? - Stack Overflow

    144 nth root of x is x^(1/n), so you can do 9**(1/2) to find the 2nd root of 9, for example. In general, you can compute the nth root of x as: x**(1/n) Note: In Python 2, you had to do …

  3. How to perform square root without using math module?

    Jun 15, 2010 · I want to find the square root of a number without using the math module,as i need to call the function some 20k times and dont want to slow down the execution by linking to the …

  4. python - Applying sqrt function on a column - Stack Overflow

    May 16, 2016 · You'll need to complete a few actions and gain 15 reputation points before being able to upvote. Upvoting indicates when questions and answers are useful. What's reputation …

  5. performance - Which is faster in Python: x**.5 or math.sqrt (x ...

    There are at least 3 ways to do a square root in Python: math.sqrt, the '**' operator and pow (x,.5). I'm just curious as to the differences in the implementation of each of these. When it comes to …

  6. Python- Square Root of list - Stack Overflow

    Mar 23, 2022 · Taking the square root of each number in a list. For this problem in the sqrt_list function: Take the square root of each item in the list, Store each squared item in another list, …

  7. python - Sqrt only one column in numpy - Stack Overflow

    May 17, 2022 · I have the following 2D array, and want to take a square root of only column A. import numpy as np a = np.matrix([[1, 2], [3, 4], [5, 6], [7, 8]]) a matrix([[1, 2 ...

  8. math - Integer square root in python - Stack Overflow

    Mar 13, 2013 · Is there an integer square root somewhere in python, or in standard libraries? I want it to be exact (i.e. return an integer), and raise an exception if the input isn't a perfect …

  9. Is there any way to get a sqrt of a matrix in NumPy? Not element …

    Apr 17, 2020 · Well, you can do it using scipy. If you want to do it with numpy however, then I think that your best guess is to diagonalize your matrix and then to compute the square root of …

  10. How can I take the square root of -1 using python?

    When I take the square root of -1 it gives me an error: invalid value encountered in sqrt How do I fix that? from numpy import sqrt arr = sqrt(-1) print(arr)