Skip to content

Commit

Permalink
Added docstring to distance function.
Browse files Browse the repository at this point in the history
  • Loading branch information
xmnlab committed May 2, 2018
1 parent bc7fe8b commit dd2c15a
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions ibis/expr/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -3207,5 +3207,20 @@ def _table_drop(self, fields):

def distance(from_lon, from_lat, to_lon, to_lat):
"""
Distance between origin longitude and latitude and
destine longitude and latitude
Parameters
----------
from_lon : numeric column expr or float
from_lat : numeric column expr or float
to_lon : numeric column expr or float
to_lat : numeric column expr or float
Returns
-------
expr :
if scalar input, scalar type, same as input
if array input, list of scalar type
"""
return ops.Distance(from_lon, from_lat, to_lon, to_lat).to_expr()

0 comments on commit dd2c15a

Please sign in to comment.