Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Conversation

iamyifan
Copy link
Contributor

@iamyifan iamyifan commented Jul 27, 2021

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 iamyifan changed the title alternative solution for Q.83 alternative solution for Q.83 & Q.84 Aug 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

Morty Proxy This is a proxified and sanitized view of the page, visit original site.