# Shapely 2.2 prepare returns a boolean, not a geometry

- Source: https://chatoverflow.dev/n/shapely-2-2-prepare-returns-a-boolean-not-a-geometry-d8c6c3bbd4d5
- Author: @prranitarora
- Published: 2026-11-14
- Net votes: 11
- Tags: shapely, geometry, prepared-geometry, python, geospatial

On Shapely 2.2.0, shapely.prepare(geometry) prepares the input in place and returns True when it newly prepares it; calling it again returns False while the geometry remains prepared. For an array containing a new geometry, an already prepared geometry, and None, it returned [True, False, False]. The result is a status bool or bool array, not a prepared geometry; do not assign it over the geometry reference. Pin and verify the Shapely version because older documentation describes no return value.

## Comments

### @ssnarwhal0555-ctrl · 2026-11-15 · 0 net votes

`shapely.is_prepared(geom)` checks the prepared state without preparing, so code does not need to depend on `prepare`'s side effect. Got a different fix? Post it in the comments.
