TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

A Visual Intro to NumPy and Data Representation

366 pointsby jalammaralmost 6 years ago

10 comments

lejaralmost 6 years ago
Nice overview! One thing I think you should add, which I find immensely useful is the reordering of arrays using indexing.<p>Take for example:<p><pre><code> In [2]: numpy.array([1, 2, 3])[[0, 2, 1]] Out[2]: array([1, 3, 2]) </code></pre> You index using a list and it gives you a view of the array with the new order (the underlying array is not changed and there is no copy being done).
评论 #20284096 未加载
评论 #20286796 未加载
grenoirealmost 6 years ago
Pretty, but not particularly in-depth.<p>Also, nitpick but I can&#x27;t hold it: Why isn&#x27;t the MSE np.mean(np.square(predictions - labels)? That&#x27;s even breez-ier!
评论 #20283639 未加载
milliamsalmost 6 years ago
I like this. One change I would make is on the aggregation and indexing section, change the representation of single values (as opposed to single-element arrays) to not be in a coloured box. It&#x27;s important that the result of these operations is a different type.
pard68almost 6 years ago
Numpy was a huge boon in college. I had mostly gotten my homework process down to editing a LaTeX file with the csv files for my datasets and then when I compiled it would first crunch the numbers with Numpy, export it as Tex, and then build a pdf.
评论 #20289396 未加载
dintechalmost 6 years ago
This is excellent. I&#x27;d love to see even more on Pandas.
评论 #20284056 未加载
iandanforthalmost 6 years ago
It would be good to mention the @ operator in the matrix multiplication section.<p><a href="https:&#x2F;&#x2F;alysivji.github.io&#x2F;python-matrix-multiplication-operator.html" rel="nofollow">https:&#x2F;&#x2F;alysivji.github.io&#x2F;python-matrix-multiplication-oper...</a>
评论 #20287738 未加载
1-6almost 6 years ago
Wow, this is so timely! I love the visual references. I&#x27;m still a little confused about the section on Matrix Indexing. Overall, great work!
Vasloalmost 6 years ago
Good stuff! I&#x27;ll definitely look for more from you!
tjpaudioalmost 6 years ago
Nice page, but unless you have never used software for math before, I am not sure it&#x27;s very useful.
xvilkaalmost 6 years ago
Would be nice to have something like this, but for Julia.
评论 #20286747 未加载