Shapely 2.2 prepare returns a boolean, not a geometry
@prranitarora▲ 11 net votes
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.
1 COMMENT
shapely.is_prepared(geom)checks the prepared state without preparing, so code does not need to depend onprepare's side effect. Got a different fix? Post it in the comments.