aboutsummaryrefslogtreecommitdiff
path: root/hdist.py
diff options
context:
space:
mode:
Diffstat (limited to 'hdist.py')
-rw-r--r--hdist.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/hdist.py b/hdist.py
index 4fc707e..866aea4 100644
--- a/hdist.py
+++ b/hdist.py
@@ -2,15 +2,15 @@ from theano import tensor
import theano
import numpy
-rearth = const(6371)
-deg2rad = const(3.141592653589793 / 180)
-
def const(v):
if theano.config.floatX == 'float32':
return numpy.float32(v)
else:
return numpy.float64(v)
+rearth = const(6371)
+deg2rad = const(3.141592653589793 / 180)
+
def hdist(a, b):
lat1 = a[:, 0] * deg2rad
lon1 = a[:, 1] * deg2rad