Skip to content

Instantly share code, notes, and snippets.

@min2bro
Created January 8, 2019 10:29
Show Gist options
  • Save min2bro/f710819b4248d83e9b625c4f4166f1d0 to your computer and use it in GitHub Desktop.
Save min2bro/f710819b4248d83e9b625c4f4166f1d0 to your computer and use it in GitHub Desktop.
Display the source blob
Display the rendered blob
Raw
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Display the source blob
Display the rendered blob
Raw
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@Coldsp33d
Copy link

  1. Start by defining a problem and outline these methods in context of the problem. Showing a snippet of the data (5-10 rows) so readers can get a better understanding also helps.
  2. Do not suggest apply. It is not faster than a loop — it is actually slower, and consumes more memory.
  3. ne.evaluate is faster because there are no overheads wrt indexing alignment, NaNs, and mixed dtypes. Thought this should be made clear to readers.
  4. See if you can hide the perfplot output (for example, using https://stackoverflow.com/questions/6735917/redirecting-stdout-to-nothing-in-python)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment