Repository: geopandas/geopandas

Issue:
Remove unused points_from_xy
I don't think this `points_from_xy` is used anywhere:
 https://github.com/geopandas/geopandas/blob/9e45a12bcf114e13fc530ce9ff8a7eb533c9de86/geopandas/array.py#L204

The init does:

https://github.com/geopandas/geopandas/blob/9e45a12bcf114e13fc530ce9ff8a7eb533c9de86/geopandas/__init__.py#L3


Discussion:
I think someone just forgot to change it. `points_from_xy` should be used as it ensures that resulting points are returned as GeometryArray. So instead of removing it, I guess we should change  
`from geopandas.array import _points_from_xy as points_from_xy` to 
`from geopandas.array import points_from_xy`. 

Resolving patch:
diff --git a/geopandas/__init__.py b/geopandas/__init__.py
--- a/geopandas/__init__.py
+++ b/geopandas/__init__.py
@@ -1,6 +1,6 @@
 from geopandas.geoseries import GeoSeries  # noqa
 from geopandas.geodataframe import GeoDataFrame  # noqa
-from geopandas.array import _points_from_xy as points_from_xy  # noqa
+from geopandas.array import points_from_xy  # noqa
 
 from geopandas.io.file import read_file  # noqa
 from geopandas.io.sql import read_postgis  # noqa
diff --git a/geopandas/array.py b/geopandas/array.py
--- a/geopandas/array.py
+++ b/geopandas/array.py
@@ -177,14 +177,7 @@ def _points_from_xy(x, y, z=None):
 
     Parameters
     ----------
-    x, y, z : array
-
-    Examples
-    --------
-    >>> geometry = geopandas.points_from_xy(x=[1, 0], y=[0, 1])
-    >>> geometry = geopandas.points_from_xy(df['x'], df['y'], df['z'])
-    >>> gdf = geopandas.GeoDataFrame(
-            df, geometry=geopandas.points_from_xy(df['x'], df['y']))
+    x, y, z : iterable
 
     Returns
     -------
@@ -202,7 +195,24 @@ def _points_from_xy(x, y, z=None):
 
 
 def points_from_xy(x, y, z=None):
-    """Convert arrays of x and y values to a GeometryArray of points."""
+    """
+    Generate GeometryArray of shapely Point geometries from x, y(, z) coordinates.
+
+    Parameters
+    ----------
+    x, y, z : iterable
+
+    Examples
+    --------
+    >>> geometry = geopandas.points_from_xy(x=[1, 0], y=[0, 1])
+    >>> geometry = geopandas.points_from_xy(df['x'], df['y'], df['z'])
+    >>> gdf = geopandas.GeoDataFrame(
+            df, geometry=geopandas.points_from_xy(df['x'], df['y']))
+
+    Returns
+    -------
+    output : GeometryArray
+    """
     x = np.asarray(x, dtype="float64")
     y = np.asarray(y, dtype="float64")
     if z is not None:


Test patch:
diff --git a/geopandas/tests/test_array.py b/geopandas/tests/test_array.py
--- a/geopandas/tests/test_array.py
+++ b/geopandas/tests/test_array.py
@@ -70,15 +70,19 @@ def test_points_from_xy():
     gsz = [shapely.geometry.Point(x, x, x) for x in range(10)]
     geometry1 = geopandas.points_from_xy(df["x"], df["y"])
     geometry2 = geopandas.points_from_xy(df["x"], df["y"], df["z"])
-    assert geometry1 == gs
-    assert geometry2 == gsz
+    assert isinstance(geometry1, GeometryArray)
+    assert isinstance(geometry2, GeometryArray)
+    assert list(geometry1) == gs
+    assert list(geometry2) == gsz
 
     # using Series or numpy arrays or lists
     for s in [pd.Series(range(10)), np.arange(10), list(range(10))]:
         geometry1 = geopandas.points_from_xy(s, s)
         geometry2 = geopandas.points_from_xy(s, s, s)
-        assert geometry1 == gs
-        assert geometry2 == gsz
+        assert isinstance(geometry1, GeometryArray)
+        assert isinstance(geometry2, GeometryArray)
+        assert list(geometry1) == gs
+        assert list(geometry2) == gsz
 
     # using different lengths should throw error
     arr_10 = np.arange(10)