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.

NumPy 1.20

168 pointsby heydenberkover 4 years ago

12 comments

calhoun137over 4 years ago
A really great way to learn more about numpy is with Math Inspector[1]. It creates a block coding environment which works with the entire numpy&#x2F;scipy stack, it also has an interactive 2d and 3d plotting library that updates the functionality in mathplotlib. Also, I made it =) Just spent the past 3 months working day and night and released a massive update a few days ago. Check out the youtube video on the bottom of the page for more in depth information.<p>[1] <a href="https:&#x2F;&#x2F;mathinspector.com&#x2F;" rel="nofollow">https:&#x2F;&#x2F;mathinspector.com&#x2F;</a>
评论 #25978793 未加载
评论 #25979793 未加载
评论 #25981336 未加载
评论 #25979850 未加载
评论 #25979995 未加载
评论 #25979967 未加载
评论 #25978809 未加载
评论 #25979952 未加载
michaericalriboover 4 years ago
NumPy is incredible to me: it serves not only as a critical bare-metal layer, but also an essential tool in its own right, and I can’t imagine using Python without it. I do numerical work—ML&#x2F;data science&#x2F;statistics—and I simply couldn’t accomplish any of what I do without the functionality provided by NumPy. np.array alone is worth all the king’s gold.<p>It is interesting to me that in many respects it serves as “guts”. I definitely drop down to use numpy directly with regularity. But it’s also possible to do 80-90% of the job without ever explicitly using the module itself. It’s baked in everywhere, to the point that it feels like just another standard library.<p>Exciting to see progress! Keep up the good work, numpy team :)
评论 #25978466 未加载
评论 #25981343 未加载
chalstover 4 years ago
Quick summary: &quot;This NumPy release is the largest so made to date, some 684 PRs contributed by 184 people have been merged.&quot;<p><pre><code> &gt; Annotations for NumPy functions. This work is ongoing and improvements can be expected pending feedback from users. &gt; Wider use of SIMD to increase execution speed of ufuncs. Much work has been done in introducing universal functions that will ease use of modern features across different hardware platforms. This work is ongoing. &gt;Preliminary work in changing the dtype and casting implementations in order to provide an easier path to extending dtypes. This work is ongoing but enough has been done to allow experimentation and feedback. &gt; Extensive documentation improvements comprising some 185 PR merges. This work is ongoing and part of the larger project to improve NumPy’s online presence and usefulness to new users. &gt; Further cleanups related to removing Python 2.7. This improves code readability and removes technical debt. &gt; Preliminary support for the upcoming Cython 3.0. </code></pre> Type annotations seem the biggest deal to me. I&#x27;d say if you care a lot about SIMD and the performance issues, you should be thinking of moving to Julia: it&#x27;s still a valuable technical achievement.
评论 #25978481 未加载
ZuLuuuuuuover 4 years ago
&quot;sliding_window_view&quot; method will be a great addition. Sliding windows are used quite frequently when analysing data and currently you can kind of achieve it using &quot;as_strided&quot; method but that method is very cumbersome to use. But from the examples given, &quot;sliding_window_view&quot; is much easier to use.
评论 #25978893 未加载
jphowardover 4 years ago
I _love_ numpy, and I am getting excited about jax, too.<p>However, I do have one request for it. Getting the argmax of a multi-dimensional array, in terms of the array&#x27;s dimensions, is difficult for new users.<p>np.argmax(np.array([[1,2,3],[1,9,3],[1,2,3]])) is 4, rather than (1,1). I understand why, but it seems strange to me that argmax cannot return a value the user can use to index their array.<p>Having to then feed that `4` into unravel_index() with the array&#x27;s shape as a parameter seems less elegant than say passing a parameter of &quot;as_index=True&quot; to the argmax.
评论 #26111930 未加载
评论 #25978351 未加载
u678uover 4 years ago
NumPy&#x2F;Pandas is one of the reasons I&#x27;m stuck on Python. I&#x27;d prefer a strongly typed language like go&#x2F;java&#x2F;rust but there isn&#x27;t the same library or community. Any recommendations? Its for applications not just DS&#x2F;ML so Julia isn&#x27;t really in scope.
评论 #25981208 未加载
评论 #25980478 未加载
评论 #25981144 未加载
throwaway9930over 4 years ago
If you know Python, then trying NumPy is pain.<p>Because for some reason data scientists have managed to misuse the python syntax. E.g. `np.ogrid[ -200000000:200000000:100j,-500000:500000:100j]` it&#x27;s completely unexplainable what this does. They have managed to overload index&#x2F;slice operator and imaginary numbers to produce two arrays.<p>(Example taken from here <a href="https:&#x2F;&#x2F;asecuritysite.com&#x2F;comms&#x2F;plot06" rel="nofollow">https:&#x2F;&#x2F;asecuritysite.com&#x2F;comms&#x2F;plot06</a> )
jjgreenover 4 years ago
I&#x27;ve been getting some odd warnings (thousands of them) from CI runs against 1.20, typical:<p><pre><code> some-file.py:83: DeprecationWarning: `np.bool` is a deprecated alias for the builtin `bool`. To silence this warning, use `bool` by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use `np.bool_` here. Deprecated in NumPy 1.20; for more details and guidance: https:&#x2F;&#x2F;numpy.org&#x2F;devdocs&#x2F;release&#x2F;1.20.0&#x2F;notes.html#deprecations return self.z[j][i] </code></pre> But all of the lines mentioned in these warning do not reference np.bool
评论 #25981340 未加载
评论 #25983556 未加载
user2049over 4 years ago
It is great to see type annotations! A huge step in the right direction.
评论 #25978334 未加载
mrcactu5over 4 years ago
There&#x27;s a random shuffle function. Instead of writing one out using an algorithms textbook. Lots of data types get randomly shuffled during coding.<p>Shuffles arrays and lists. <a href="https:&#x2F;&#x2F;numpy.org&#x2F;doc&#x2F;stable&#x2F;reference&#x2F;random&#x2F;generated&#x2F;numpy.random.shuffle.html" rel="nofollow">https:&#x2F;&#x2F;numpy.org&#x2F;doc&#x2F;stable&#x2F;reference&#x2F;random&#x2F;generated&#x2F;nump...</a>
sandGorgonover 4 years ago
The most interesting question here is the newest competitor to Numpy - Tensorflow - <a href="https:&#x2F;&#x2F;www.tensorflow.org&#x2F;guide&#x2F;tf_numpy" rel="nofollow">https:&#x2F;&#x2F;www.tensorflow.org&#x2F;guide&#x2F;tf_numpy</a><p>With the added advantage that TF is natively accelerated on M1.<p>Will TF-Numpy maintain parity ?
评论 #25979694 未加载
RocketSyntaxover 4 years ago
Hmm. I am checking dtypes via `np.floating` and `np.signedinteger`. What will this change to?