example: print(timeit.timeit(cal_pi(100_0000),number=10000))
Because cal_PI function have parameters:
Modify to: print(timeit.timeit(lambda: cal_pi(100_0000),number=10000))
Read More:
- Python error: ‘int’ object is not callable
- Python TypeError: not all arguments converted during string formatting [Solved]
- Python Time Module timestamp, Time string formatting and Conversion (13-bit timestamp)
- Typeerror in Python regular expression: expected string or bytes like object
- [Solved] TypeError: not all arguments converted during string formatting
- [Solved] python Error: ValueError: The truth value of a Series is ambiguous. Use a.empty, a.bool(), a.item(), a.
- Python: How to Use try exception to Display Abnormal Error Information
- Tips for Python 3 string.punctuation
- Python+OpenCV: How to Use Background Subtraction Methods
- [Solved] python opencv Error: findContours() Can only use the Grayscale
- [How to Solve] Python TypeError: ‘int‘ object is not subscriptable
- [Solved] python-sutime Error: the JSON object must be str, bytes or bytearray, not ‘java.lang.String‘
- Pandas ValueError: The truth value of a Series is ambiguous. Use a.empty, a.bool(), a.item(), a.an
- Python: How to Use os.path.join()
- Python TypeError: coercing to Unicode: need string or buffer, NoneType found
- Python Use sqlalchemy Error: pymssql.ProgrammingError: (102, b“Incorrect syntax near ‘(‘.DB-Lib error
- Python Use PIP to install pyinstaller Error [Solved]
- The automatic token of Python interface is passed into the header
- Autograd error in Python: runtimeerror: grad can be implicitly created only for scalar outputs
- [Solved] Request.url is not modifiable, use Request.replace() instead