Created
January 2, 2015 17:47
-
-
Save benjaminrose/9d9eb9edd5089eb4684c to your computer and use it in GitHub Desktop.
Convert [0,36-) to [-180,180)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'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