About 12,600,000 results
Open links in new tab
  1. python - How to check for NaN values - Stack Overflow

    While math.isnan and np.isnan will return True for NaN values, you cannot check for different type of objects like None or strings. Both methods will return an error, so checking a list with mixed types will …

  2. How to compare floats for almost-equality in Python?

    542 Python 3.5 adds the math.isclose and cmath.isclose functions as described in PEP 485. If you're using an earlier version of Python, the equivalent function is given in the documentation.

  3. math - Inverse Cosine in Python - Stack Overflow

    So when i math.acos (x), python asks the kernal to look through that data table for whichever angle has a cosine of x, and when it finds it, it returns the first entry it appears with. and then python gives that …

  4. How do you do natural logs (e.g. "ln()") with numpy in Python?

    Using numpy, how can I do the following: ln(x) Is it equivalent to: np.log(x) I apologise for such a seemingly trivial question, but my understanding of the difference between log and ln is that ...

  5. Handling very large numbers in Python - Stack Overflow

    Python supports a "bignum" integer type which can work with arbitrarily large numbers. In Python 2.5+, this type is called long and is separate from the int type, but the interpreter will automatically use …

  6. python - How do you round UP a number? - Stack Overflow

    May 5, 2017 · Elaboration: math.ceil returns the smallest integer which is greater than or equal to the input value. This function treats the input as a float (Python does not have strongly-typed variables) …

  7. math - Is there a short-hand for nth root of x in Python ... - Stack ...

    In maths, if I wish to calculate 3 to the power of 2 then no symbol is required, but I write the 2 small: 3². In Python this operation seems to be represented by the ** syntax. >>> 3**2 9 ...

  8. What is the difference between int() and floor() in Python 3?

    Rounding down can be done in many ways, some methods are equivalent, e.g. built-in int, numpy.trunc and numpy.fix which truncate the number, meaning for a negative number they return a result which …

  9. Is there a ceiling equivalent of // operator in Python?

    I found out about the // operator in Python which in Python 3 does division with floor. Is there an operator which divides with ceil instead? (I know about the / operator which in Python 3 does fl...

  10. Python math module - Stack Overflow

    python math module import logarithm edited Jan 9, 2012 at 3:01 juliomalegria 25k 14 77 89