4 ms·
At the risk of being pedantic...if you're not familiar with data/math work in Python, the `np` word refers to "numpy", which is an extension to Python that incl
by danso 11y ago
At the risk of being pedantic...if you're not familiar with data/math work in Python, the `np` word refers to "numpy", which is an extension to Python that includes array and matrix math...so the OP needs 12 lines, the first being:
import numpy as np
- scott_karana 11y agoThank you! Non-obvious for sure.
- Bostonian 11y agoI knew that np stood for numpy but had to Google to realize that the .T suffix meant transpose.
- afarrell 11y agoThat isn't pedantic at all. Python tutorials should always include imports.
- ksenzee 11y agoNo, definitely not pedantic. In fact, I have only just now realized that "numpy" means "NumPy," instead of being a nonsense word that rhymes with "lumpy." Sigh.
- blazespin 11y ago... Isn't grammatically correct. Pedantic, I know.
- nine_k 11y agoFamous antigravity in one line in Python: https://xkcd.com/353/ https://xkcd.com/353/