{"id":24562,"library":"scikit-spatial","title":"scikit-spatial","description":"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.","status":"active","version":"9.0.1","language":"python","source_language":"en","source_url":"https://github.com/ajhynes7/scikit-spatial","tags":["spatial","geometry","numpy","vectors","points","lines","planes"],"install":[{"cmd":"pip install scikit-spatial","lang":"bash","label":"latest from PyPI"}],"dependencies":[{"reason":"All spatial objects are backed by NumPy arrays.","package":"numpy","optional":false},{"reason":"Required for plotting functionality (e.g., plot methods).","package":"matplotlib","optional":true}],"imports":[{"note":"Main class for points.","symbol":"Point","correct":"from skspatial.objects import Point"},{"note":"Main class for lines.","symbol":"Line","correct":"from skspatial.objects import Line"},{"note":"Main class for planes.","symbol":"Plane","correct":"from skspatial.objects import Plane"},{"note":"Main class for vectors.","symbol":"Vector","correct":"from skspatial.objects import Vector"}],"quickstart":{"code":"from skspatial.objects import Point, Line, Vector\n\npoint = Point([1, 2, 3])\nline = Line(point=[0, 0, 0], direction=[1, 1, 1])\nvector = Vector([1, 0, 0])\n\nprint(point)\nprint(line)\nprint(vector)\n\n# Distance from point to line\ndist = line.distance_point(point)\nprint(f\"Distance: {dist}\")","lang":"python","description":"Create a point, line, and vector; compute distance from point to line."},"warnings":[{"fix":"Use 'Point([x, y, z])' instead of 'Point(x, y, z)'.","message":"In version 9.0.0, the 'Point' class constructor changed: a single list/array of coordinates is required, not separate arguments.","severity":"breaking","affected_versions":"<9.0.0"},{"fix":"Always use keyword arguments: Line(point=..., direction=...).","message":"The 'Line' class no longer accepts 'point' and 'direction' as positional arguments; they must be keyword arguments.","severity":"gotcha","affected_versions":">=8.0.0"},{"fix":"Use 'Plane.from_three_points' instead of 'Plane.from_points'.","message":"The 'Plane.from_points' method is deprecated in favor of 'Plane.from_three_points'.","severity":"deprecated","affected_versions":">=7.0.0"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Install matplotlib: pip install matplotlib. Then re-run your code.","cause":"Plotting requires matplotlib, which is an optional dependency.","error":"AttributeError: 'Point' object has no attribute 'plot'"},{"fix":"Pass coordinates as a single list: Point([x, y, z]).","cause":"Using old constructor style Point(x, y, z) instead of Point([x, y, z]).","error":"TypeError: __init__() takes 1 positional argument but 4 were given"},{"fix":"Ensure the direction vector is non-zero, e.g., Line(point=[0,0,0], direction=[1,0,0]).","cause":"Creating a Line with a zero direction vector.","error":"ValueError: The direction vector cannot be zero."}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}