diff options
author | Alex Auvolat <alex.auvolat@ens.fr> | 2015-05-04 13:20:50 -0400 |
---|---|---|
committer | Alex Auvolat <alex.auvolat@ens.fr> | 2015-05-04 13:20:50 -0400 |
commit | 929eaf8dd0233f8423b24b93b78c99fc9df65343 (patch) | |
tree | 9cd2982aa8ca60505ddb35c93f427fe63b0c8508 /hdist.py | |
parent | 9adfe767010e23823089b4db94cb4dc53cc3c12a (diff) | |
download | taxi-929eaf8dd0233f8423b24b93b78c99fc9df65343.tar.gz taxi-929eaf8dd0233f8423b24b93b78c99fc9df65343.zip |
Fixes
Diffstat (limited to 'hdist.py')
-rw-r--r-- | hdist.py | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -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 |