You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# If the operator is not defined for the underlying objects,
# a TypeError should be raised
res= [op(a, b) for (a, b) inzip(lvalues, rvalues)]
res=np.asarray(res, dtype=bool)
returnres
def__eq__(self, other):
returnself._binop(other, operator.eq)
def__ne__(self, other):
returnself._binop(other, operator.ne)
So this essentially still uses a python for loop acting on scalar shapely geoometries, instead of one of the vectorized ufuncs from shapely.
Now, if we want to ensure to keep this consistent with shapely's geometry __eq__, there is not actually a direct ufunc equivalent (shapely switched to use equals_exact in 2.0.0, but that was reverted because of ignoring th z dimension, shapely/shapely#1732).
But for a future shapely 2.1.0, there will be a ufunc that is equivalent to the scalar __eq__, i.e. equals_identical (shapely/shapely#1760), and then we should ensure to update our code here to use that ufunc instead of the slow python loop.
The text was updated successfully, but these errors were encountered:
The (in)equality for GeometryArray is defined here:
geopandas/geopandas/array.py
Lines 1656 to 1667 in 167c061
So this essentially still uses a python for loop acting on scalar shapely geoometries, instead of one of the vectorized ufuncs from shapely.
Now, if we want to ensure to keep this consistent with shapely's geometry
__eq__
, there is not actually a direct ufunc equivalent (shapely switched to useequals_exact
in 2.0.0, but that was reverted because of ignoring th z dimension, shapely/shapely#1732).But for a future shapely 2.1.0, there will be a ufunc that is equivalent to the scalar
__eq__
, i.e.equals_identical
(shapely/shapely#1760), and then we should ensure to update our code here to use that ufunc instead of the slow python loop.The text was updated successfully, but these errors were encountered: