NumPy 1.20 has been released
NumPy 1.20 has been released
Posted Feb 24, 2021 9:03 UTC (Wed) by quietbritishjim (subscriber, #114117)Parent article: NumPy 1.20 has been released
Isn't the new where argument:
np.any(ri < 3, where=ri%2 == 0)
the same as using the existing logical_and:
np.any(np.logical_and(ri < 3, ri%2 == 0))
? If so, is there any benefit to the new notation? I suppose perhaps speed? I see it's slightly more consise, but the composing two functions seems clearer to me and is much more flexible.
Posted Feb 24, 2021 14:05 UTC (Wed)
by leephillips (subscriber, #100450)
[Link] (1 responses)
Posted Feb 24, 2021 14:49 UTC (Wed)
by mhvk (subscriber, #86585)
[Link]
p.s. What makes `ndarray` so particularly nice is how it deals with strides to allow views of many forms into the array. This is nicely described in the "array programming with numpy" article; see https://ui.adsabs.harvard.edu/abs/2020Natur.585..357H/abs...
Posted Feb 25, 2021 6:59 UTC (Thu)
by cozzyd (guest, #110972)
[Link]
NumPy 1.20 has been released
NumPy 1.20 has been released
NumPy 1.20 has been released
