Python package wrapping scipy.sparse.csgraph.dijkstra with a grid-based interface
Project description
gridijkstra
Python package wrapping scipy's dijkstra with a grid-based interface
>>> import gridijkstra
>>> import numpy as np
>>> costs = np.ones((50, 60))
>>> costs[10:15, :20] = 1e30 # np.inf also works, but is less convenient for plotting
>>> costs[20:25, 25:55] = 1e30
>>> costs[30:40, 30:40] = 1e30
>>> start = (2, 2)
>>> target = (48, 58)
>>> total_cost, path = gridijkstra.plan(costs, start, target, return_path=True)
>>> print(f'Full path length: {total_cost}')
'Full path length: 102.0'
Three use cases are shown below. See scripts/examples.ipynb for a notebook with examples
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
gridijkstra-0.1.tar.gz
(4.7 kB
view details)
Built Distribution
File details
Details for the file gridijkstra-0.1.tar.gz
.
File metadata
- Download URL: gridijkstra-0.1.tar.gz
- Upload date:
- Size: 4.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.0 CPython/3.8.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 800ab2f655cce3e08657b650e42f3825aef1793945c42e0ca0c9e6404bcead59 |
|
MD5 | 6c58ec52ebe49a1d3d2854381d2042ba |
|
BLAKE2b-256 | 79d1e3259d906ec2e283834e4833d1a97c86dfbf4de70344b297a7076fb64699 |
File details
Details for the file gridijkstra-0.1-py3-none-any.whl
.
File metadata
- Download URL: gridijkstra-0.1-py3-none-any.whl
- Upload date:
- Size: 5.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.0 CPython/3.8.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 82b6dfd6473e674999ddd68e87966f6ff789c527de029a696b1a90ab8d5a0c7e |
|
MD5 | 694f7da9676271684302a212ac086f64 |
|
BLAKE2b-256 | 100e3c8892e5b04cb3a4df5e4c98a86cec92961d24d600cb0163ece8fc743efa |