cythoneuclideandistance


Namecythoneuclideandistance JSON
Version 0.11 PyPI version JSON
download
home_pagehttps://github.com/hansalemaos/cythoneuclideandistance
SummaryCalculate Euclidean distances between two sets of coordinates (Cython and Numexpr)
upload_time2023-11-13 08:00:37
maintainer
docs_urlNone
authorJohannes Fischer
requires_python
licenseMIT
keywords calculate euclidean
VCS
bugtrack_url
requirements Cython numexpr numpy
Travis-CI No Travis.
coveralls test coverage No coveralls.
            
# Calculate Euclidean distances between two sets of coordinates (Cython and Numexpr)

## Tested against Windows / Python 3.11 / Anaconda

## pip install cythoneuclideandistance

```python
Calculate Euclidean distances between two sets of coordinates.

This function computes the Euclidean distance matrix between two sets of coordinates.

Args:
    coords1 (numpy.ndarray): An array of shape (n, 2) containing the first set of coordinates.
    coords2 (numpy.ndarray): An array of shape (m, 2) containing the second set of coordinates.

Returns:
    numpy.ndarray: A 2D array of shape (n, m) containing the Euclidean distances between all pairs of coordinates.

Example:
    import random
    import cythoneuclideandistance
    import numpy as np

    coords1 = np.array(
        [[random.randint(1, 1000), random.randint(1, 1000)] for _ in range(23000)],
        dtype=np.int32,
    )
    coords2 = np.array(
        [[random.randint(1, 1000), random.randint(1, 1000)] for _ in range(22150)],
        dtype=np.int32,
    )

    distance_matrix = cythoneuclideandistance.calculate_euc_distance(coords1, coords2)
    print(distance_matrix)

```

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/hansalemaos/cythoneuclideandistance",
    "name": "cythoneuclideandistance",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "Calculate Euclidean",
    "author": "Johannes Fischer",
    "author_email": "aulasparticularesdealemaosp@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/d1/42/b3bfd1163595560a60636757e31eccc6c885206869336331449d0a78834f/cythoneuclideandistance-0.11.tar.gz",
    "platform": null,
    "description": "\r\n# Calculate Euclidean distances between two sets of coordinates (Cython and Numexpr)\r\n\r\n## Tested against Windows / Python 3.11 / Anaconda\r\n\r\n## pip install cythoneuclideandistance\r\n\r\n```python\r\nCalculate Euclidean distances between two sets of coordinates.\r\n\r\nThis function computes the Euclidean distance matrix between two sets of coordinates.\r\n\r\nArgs:\r\n    coords1 (numpy.ndarray): An array of shape (n, 2) containing the first set of coordinates.\r\n    coords2 (numpy.ndarray): An array of shape (m, 2) containing the second set of coordinates.\r\n\r\nReturns:\r\n    numpy.ndarray: A 2D array of shape (n, m) containing the Euclidean distances between all pairs of coordinates.\r\n\r\nExample:\r\n    import random\r\n    import cythoneuclideandistance\r\n    import numpy as np\r\n\r\n    coords1 = np.array(\r\n        [[random.randint(1, 1000), random.randint(1, 1000)] for _ in range(23000)],\r\n        dtype=np.int32,\r\n    )\r\n    coords2 = np.array(\r\n        [[random.randint(1, 1000), random.randint(1, 1000)] for _ in range(22150)],\r\n        dtype=np.int32,\r\n    )\r\n\r\n    distance_matrix = cythoneuclideandistance.calculate_euc_distance(coords1, coords2)\r\n    print(distance_matrix)\r\n\r\n```\r\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Calculate Euclidean distances between two sets of coordinates (Cython and Numexpr)",
    "version": "0.11",
    "project_urls": {
        "Homepage": "https://github.com/hansalemaos/cythoneuclideandistance"
    },
    "split_keywords": [
        "calculate",
        "euclidean"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "745ae617eb8abe727b54cc554fd8d8415d0ab20a7ede9dcbc5f8699a6804c6bb",
                "md5": "a66b47318a70a10be81eae387daa0172",
                "sha256": "0fcdf6b9bfaa74e4232bd3c5b617a7a7afef53d80bdd596a01ebf03fb4e254f7"
            },
            "downloads": -1,
            "filename": "cythoneuclideandistance-0.11-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "a66b47318a70a10be81eae387daa0172",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 22353,
            "upload_time": "2023-11-13T08:00:35",
            "upload_time_iso_8601": "2023-11-13T08:00:35.330054Z",
            "url": "https://files.pythonhosted.org/packages/74/5a/e617eb8abe727b54cc554fd8d8415d0ab20a7ede9dcbc5f8699a6804c6bb/cythoneuclideandistance-0.11-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "d142b3bfd1163595560a60636757e31eccc6c885206869336331449d0a78834f",
                "md5": "7f0d60a8d68b559006f927403b4de004",
                "sha256": "768a2bab45157265e87ce6f7d4386cfce2b47ec1e39bce31526757b38927373a"
            },
            "downloads": -1,
            "filename": "cythoneuclideandistance-0.11.tar.gz",
            "has_sig": false,
            "md5_digest": "7f0d60a8d68b559006f927403b4de004",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 21526,
            "upload_time": "2023-11-13T08:00:37",
            "upload_time_iso_8601": "2023-11-13T08:00:37.301633Z",
            "url": "https://files.pythonhosted.org/packages/d1/42/b3bfd1163595560a60636757e31eccc6c885206869336331449d0a78834f/cythoneuclideandistance-0.11.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-11-13 08:00:37",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "hansalemaos",
    "github_project": "cythoneuclideandistance",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "requirements": [
        {
            "name": "Cython",
            "specs": []
        },
        {
            "name": "numexpr",
            "specs": []
        },
        {
            "name": "numpy",
            "specs": []
        }
    ],
    "lcname": "cythoneuclideandistance"
}
        
Elapsed time: 0.37556s