Skip to content

Instantly share code, notes, and snippets.

@tengpeng
Created April 10, 2016 15:30
Show Gist options
  • Save tengpeng/85cdca45d3f5be7dd1c16888316a7b6c to your computer and use it in GitHub Desktop.
Save tengpeng/85cdca45d3f5be7dd1c16888316a7b6c to your computer and use it in GitHub Desktop.
mean vector
mean = []
for bid, loc in bid_loc.iteritems():
try:
mean.append(np.mean(pid_ftr[loc],axis=0))
except IndexError:
pass
np.save('mean_vector', mean)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment