Two strings that are one typo apart still scored 1.0 after I turned them into sets, so I knew the…
Browsing: Python
Anaconda Python promises one download for hundreds of data science packages, so you run pip install for one project and…
I kept typing 7 // 3 and expecting 3. I had just switched from a language where integer division truncates…
I hit the Python int wall on a 10,000-digit number and got a ValueError I did not expect. I had…
I had three points and a line to fit, and I kept writing normal equations by hand. I expected residuals…
Python stops on the line the moment it meets && inside an if statement, and the caret lands under the…
A requirements.txt file lists the packages a project needs so a fresh install gets the same environment. Generating it from…
Python prints very small floats in scientific notation, like 1e-05 instead of 0.00001. The decimal form comes back with the…
np.exp turns a large input into inf and only warns instead of raising an error. The overflow matters because it…
A 3 by 3 identity from NumPy prints with a decimal point on every entry, including the zeros. Most readers…
