For Manhattan and London, the manual formula and the haversine package both return 5,563.91 km. I’m intrigued that a same-point…
Browsing: Python
The call np.arctan2(1, -1) returns 3π/4 radians. I find it striking that the ratio-only call returns -45 degrees for the…
IPython’s %pip magic installs through the active kernel, which can use a different Python from your terminal. The terminal and…
During backpropagation, an incoming gradient of 0.6 becomes 0.006 on a negative branch with slope 0.01. That small nonzero value…
At the second position, np.maximum returns 9 from the pair 8 and 9. That position-by-position result catches my attention: each…
The final np.gradient estimate can be negative even when the sample values rise, if the coordinates step backward from 9.0…
After assigning values.reverse() to result, result is None even though values has changed order. I kept digging to see what…
Prepending the first value keeps np.diff’s output the same length as the input. I notice the leading zero marks the…
The first `nn.Linear` layer maps two input features to eight hidden values. I find the two feature counts a clear…
`”banana”.find(“pear”)` returns `-1` when the text is absent. I’m fascinated that a failed search has a clear result, while `-1`…
