numpy-100 icon indicating copy to clipboard operation
numpy-100 copied to clipboard

alternative solution for Q.83 & Q.84

Open iamyifan opened this issue 2 years ago • 0 comments

Q.83: The np.bincount only counts non-negative ints according to its docs, which is not very useful in the dirty dataset. It can be optimized with np.unique(data, return_counts=True), which returns the unique values and corresponding count.

Q.84: sliding_window_view is a more readable function.

iamyifan avatar Jul 27 '21 13:07 iamyifan