Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vectorize example applying iterative function analysis to specific values #104

Merged
merged 2 commits into from
Aug 26, 2021

Conversation

rossbar
Copy link
Collaborator

@rossbar rossbar commented Aug 15, 2021

Removes the outer loop over each individual value and instead computes them all at once (the inner loop for applying the function sequentially to previous values is kept). Also condenses the visualization into a single subplot with multiple axes.

@mattip
Copy link
Member

mattip commented Aug 25, 2021

Is there a way to preview the result changed tutorial?

@rossbar
Copy link
Collaborator Author

rossbar commented Aug 25, 2021

Good question. Here's the:

Unfortunately there isn't really an html anchor anywhere near the proposed change. If you ctrl+f "iterations to each value", the modified code block is the one immediately after that paragraph.

The main goal was to remove the outer for loop and instead use vectorization to do the computations, which I thought might be a better fit for a numpy tutorial. I also ended up modifying the plots, so feedback on the visualization changes welcome.

@melissawm
Copy link
Member

Changes look good to me - thanks @rossbar !

@melissawm
Copy link
Member

@MichaelRipa want to take a look?

@MichaelRipa
Copy link
Contributor

I like this update, much less wasted space now with the shared colorbar and the 3 plots fitting onto a single row. The code is easier to follow with the outer loop removed, and the plots that were created using the Julia function also look a little less saturated, which is nice. Thanks @rossbar !

@melissawm melissawm merged commit 9952916 into numpy:main Aug 26, 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.

None yet

4 participants