Skip to main content

Interspace gives us different type distances between two vectors.

Project description


Gives us different distance between two vectors which are given in as an input.


pip install interspace

Different Distance Functions

minkowski(vector_1, vector_2, p=1)

euclidean(vector_1, vector_2)

manhattan(vector_1, vector_2)

cosine_similarity(vector_1, vector_2)

haversine(coord1, coord2, R = 6372800)

hamming(int, int)

hamming(str, str) # where, length of both the strings should be same


import interspace

# Calculate Euclidean Distace
##Output: 5.196152422706632

# Compute the great-circle distance between two points on a sphere 
# given their longitudes and latitudes.
interspace.haversine((42.5170365,  15.2778599),(51.5073219,  -0.1276474))
##Output: 1532329.6237517272

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for interspace, version 0.0.9
Filename, size File type Python version Upload date Hashes
Filename, size interspace-0.0.9-py3-none-any.whl (3.8 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size interspace-0.0.9.tar.gz (3.1 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page