Skip to content

Instantly share code, notes, and snippets.

@benjaminrose
Created January 2, 2015 17:47
Show Gist options
  • Save benjaminrose/9d9eb9edd5089eb4684c to your computer and use it in GitHub Desktop.
Save benjaminrose/9d9eb9edd5089eb4684c to your computer and use it in GitHub Desktop.
Convert [0,36-) to [-180,180)
'this still needs better testing, espcially to work with numpy'
'needs to work with degrees and radians'
def convert(x):
'x is a list, would like it to work with numpy'
ind = x>180
for i,j in enumerate(ind):
if j:
l[i]-=360
return x
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment