From d43d5e37ef45f21c4ba98592c8441b032d13c439 Mon Sep 17 00:00:00 2001 From: Matthew Bartos Date: Sat, 11 Apr 2015 15:20:21 -0700 Subject: [PATCH] Better construction of r_idx --- geopandas/tools/sjoin.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/geopandas/tools/sjoin.py b/geopandas/tools/sjoin.py index e1a43ad..029ee64 100644 --- a/geopandas/tools/sjoin.py +++ b/geopandas/tools/sjoin.py @@ -52,7 +52,7 @@ def sjoin(left_df, right_df, how='inner', op='intersects', lsuffix='left', rsuff idxmatch = idxmatch[idxmatch.str.len() > 0] r_idx = np.concatenate(idxmatch.values) - l_idx = np.concatenate((idxmatch.str.len()*pd.Series([[i] for i in idxmatch.index], index=idxmatch.index)).values) + l_idx = idxmatch.index.values.repeat(idxmatch.str.len().values) # VECTORIZE PREDICATE OPERATIONS def find_intersects(a1, a2):