Skip to content

Instantly share code, notes, and snippets.

@sburns
Created June 22, 2011 16:09
Show Gist options
  • Save sburns/1040448 to your computer and use it in GitHub Desktop.
Save sburns/1040448 to your computer and use it in GitHub Desktop.
matlab to numpy question
# given a vector
a = [ 16738, 24500, 45000, 67000];
#how can I do this in numpy efficiently?
b = []
for ia = a
b = [b ia-60:ia+300];
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment