BUG: fix GeoSeries construction from scalar on pandas master (#692)

This commit is contained in:
Joris Van den Bossche authored and GitHub committed 2018-03-17 20:11:57 +01:00
1 parent e98a289149
commit ca35666242
1 file changed
+4 -2
+4 -2
View File
@@ -32,9 +32,11 @@ class GeoSeries(GeoPandasBase, Series):
return arr.view(GeoSeries)
def __init__(self, *args, **kwargs):
# fix problem for scalar geometries passed
# fix problem for scalar geometries passed, ensure the list of
# scalars is of correct length if index is specified
if len(args) == 1 and isinstance(args[0], BaseGeometry):
args = ([args[0]],)
n = len(kwargs.get('index', [1]))
args = ([args[0]] * n,)
crs = kwargs.pop('crs', None)