<jupyter_start><jupyter_text>---author: <NAME> (<EMAIL>)---This answer assumes you have imported NumPy as follows.<jupyter_code>import numpy as np<jupyter_output><empty_output><jupyter_text>| Mathematical notation | Python code | Requires NumPy? ||--|--|--|| $x+y$ | `x+y` | no || $x-y$ | `x-y` | no || $xy$ | `x*y` | no || $\frac xy$ | `x/y` | no || $\left\lfloor\frac xy\right\rfloor$ | `x//y` | no || $\left\lfloor\frac xy\right\rfloor$ | `np.floor_divide(x,y)` | yes || remainder of $x\div y$ | `x%y` | no || remainder of $x\div y$ | `np.remainder(x,y)` | yes || $x^y$ | `x**y` | no || $\vert x\vert$ | `abs(x)` | no || $\vert x\vert$ | `np.abs(x)` | yes || $\ln x$ | `np.log(x)` | yes || $\log_a b$ | `np.log(b)/np.log(a)` | yes || $e^x$ | `np.exp(x)` | yes || $\pi$ | `np.pi` | yes || $\sin x$ | `np.sin(x)` | yes || $\sin^{-1} x$ | `np.asin(x)` | yes || $\sqrt x$ | `x**0.5` | no || $\sqrt x$ | `np.sqrt(x)` | yes |Other trigonometric functions are also available besides just `np.sin`,including `np.cos`, `np.tan`, etc.NumPy automatically applies any of these functions to all entries of a NumPyarray or pandas Series, but the built-in Python functions do not have thisfeature.  For example, to square all numbers in an array, see below.<jupyter_code>import numpy as np
example_array = np.array( [ -3, 2, 0.5, -1, 10, 9.2, -3.3 ] )
example_array ** 2<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.22910662824207492, 'fraction_numerical': 0.010806916426512969, 'mean_word_length': 3.7896551724137932, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '2', 'dir': 'jupyter-structured-clean-dedup', 'id': '452344', 'license': 'MIT', 'n_tokens_mistral': 571, 'n_tokens_neox': 556, 'n_words': 155, 'path': 'database/tasks/How to do basic mathematical computations/Python, using NumPy.ipynb', 'repo_name': 'nathancarter/how2data', 'size': '1407'}