by heydenberk on 1/31/21, 11:21 AM with 60 comments
by calhoun137 on 1/31/21, 1:21 PM
by michaericalribo on 1/31/21, 12:31 PM
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.
Exciting to see progress! Keep up the good work, numpy team :)
by chalst on 1/31/21, 12:39 PM
> Annotations for NumPy functions. This work is ongoing and improvements can be expected pending feedback from users.
> 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.
>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.
> 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.
> Further cleanups related to removing Python 2.7. This improves code readability and removes technical debt.
> Preliminary support for the upcoming Cython 3.0.
Type annotations seem the biggest deal to me. I'd say if you care a lot about SIMD and the performance issues, you should be thinking of moving to Julia: it's still a valuable technical achievement.by ZuLuuuuuu on 1/31/21, 1:35 PM
by jphoward on 1/31/21, 12:18 PM
However, I do have one request for it. Getting the argmax of a multi-dimensional array, in terms of the array's dimensions, is difficult for new users.
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.
Having to then feed that `4` into unravel_index() with the array's shape as a parameter seems less elegant than say passing a parameter of "as_index=True" to the argmax.
by u678u on 1/31/21, 5:10 PM
by throwaway9930 on 1/31/21, 6:40 PM
Because for some reason data scientists have managed to misuse the python syntax. E.g. `np.ogrid[ -200000000:200000000:100j,-500000:500000:100j]` it's completely unexplainable what this does. They have managed to overload index/slice operator and imaginary numbers to produce two arrays.
(Example taken from here https://asecuritysite.com/comms/plot06 )
by jjgreen on 1/31/21, 6:39 PM
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://numpy.org/devdocs/release/1.20.0/notes.html#deprecations
return self.z[j][i]
But all of the lines mentioned in these warning do not reference np.boolby user2049 on 1/31/21, 12:27 PM
by mrcactu5 on 2/1/21, 1:47 AM
Shuffles arrays and lists. https://numpy.org/doc/stable/reference/random/generated/nump...
by sandGorgon on 1/31/21, 3:11 PM
With the added advantage that TF is natively accelerated on M1.
Will TF-Numpy maintain parity ?
by RocketSyntax on 1/31/21, 1:08 PM