Registry / data / scikit-spatial

scikit-spatial

JSON →
library9.0.1pypypi✓ verified 84d ago

Spatial objects (points, lines, planes, vectors) and computations based on NumPy arrays. Current version: 9.0.1. Release cadence: irregular, with major version bumps for breaking changes.

pip install scikit-spatial
INSTALL
IMPORT
SIG · SCIKIT-SPATIAL
S
scikit-spatial
datapythonv9.0.1
Install
7.3s avg
Import
1425ms
Disk
230MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v9.0.1 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 1.472s · 231.1MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 7.3s · import 1.378s · 222MB
230MB installed
● package 230MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Point
from skspatial.objects import Point
Main class for points.
Line
from skspatial.objects import Line
Main class for lines.
Plane
from skspatial.objects import Plane
Main class for planes.
Vector
from skspatial.objects import Vector
Main class for vectors.

Create a point, line, and vector; compute distance from point to line.

from skspatial.objects import Point, Line, Vector point = Point([1, 2, 3]) line = Line(point=[0, 0, 0], direction=[1, 1, 1]) vector = Vector([1, 0, 0]) print(point) print(line) print(vector) # Distance from point to line dist = line.distance_point(point) print(f"Distance: {dist}")
Debug
Known issues
breakingIn version 9.0.0, the 'Point' class constructor changed: a single list/array of coordinates is required, not separate arguments.
fix
Use 'Point([x, y, z])' instead of 'Point(x, y, z)'.
affects: <9.0.0
gotchaThe 'Line' class no longer accepts 'point' and 'direction' as positional arguments; they must be keyword arguments.
fix
Always use keyword arguments: Line(point=..., direction=...).
affects: >=8.0.0
deprecatedThe 'Plane.from_points' method is deprecated in favor of 'Plane.from_three_points'.
fix
Use 'Plane.from_three_points' instead of 'Plane.from_points'.
affects: >=7.0.0
Errors
Common errors & fixes
AttributeError: 'Point' object has no attribute 'plot'
Plotting requires matplotlib, which is an optional dependency.
fix
Install matplotlib: pip install matplotlib. Then re-run your code.
TypeError: __init__() takes 1 positional argument but 4 were given
Using old constructor style Point(x, y, z) instead of Point([x, y, z]).
fix
Pass coordinates as a single list: Point([x, y, z]).
ValueError: The direction vector cannot be zero.
Creating a Line with a zero direction vector.
fix
Ensure the direction vector is non-zero, e.g., Line(point=[0,0,0], direction=[1,0,0]).
Upgrade
Version history
9.0.1latest on PyPI · released Apr 17, 2025
Audit
Dependencies
numpyrequiredAll spatial objects are backed by NumPy arrays.
matplotliboptionalRequired for plotting functionality (e.g., plot methods).
Agent activity
16 hits · last 30 days
node
8
OpenAI (training)
1
Resources
scikit-spatial — pip install scikit-spatial · libregistry