We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
[cython] GeoSeries.reindex has wrong filling logic
```
In [2]: s = GeoSeries([Point(1,1), Point(2,2)])

In [3]: s.reindex([0,1,2])
Out[3]: I am densified (3 elements)

0    POINT (1 1)
1    POINT (2 2)
2    POINT (2 2)
dtype: object
```

while this should be `Point(1 1), Point(2 2), None`

The reason for this is because the `indexer` that is passed to `GeometryBlock.take_nd` (and currently thus `GeometryArray.take`) has the form of `array([ 0,  1, -1])`:

```
> /home/joris/scipy/geopandas/geopandas/_block.py(129)take_nd()
-> new_values = self.values[indexer]
(Pdb) l
127  	        # TODO implement take_nd on GeometryArray
128  	        # new_values = self.values.take_nd(indexer, fill_value=fill_value)
129  ->	        new_values = self.values[indexer]
130  	

(Pdb) indexer
array([ 0,  1, -1])
```

--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `geopandas/_block.py`
Content:
```
1 from __future__ import absolute_import, division, print_function
2 
3 import numpy as np
4 
5 from pandas.core.internals import Block, NonConsolidatableMixIn
6 from pandas.core.common import is_null_slice
7 from shapely.geometry.base import geom_factory, BaseGeometry
8 
9 from .vectorized import GeometryArray, to_shapely, concat
10 
11 
12 class GeometryBlock(NonConsolidatableMixIn, Block):
13     """ implement a geometry block with uint pointers to C objects
14     as underlying data"""
15     __slots__ = ()
16 
17     @property
18     def _holder(self):
19         return GeometryArray
20 
21     def __init__(self, values, placement, ndim=2, **kwargs):
22 
23         if not isinstance(values, self._holder):
24             raise TypeError("values must be a GeometryArray object")
25 
26         super(GeometryBlock, self).__init__(values, placement=placement,
27                                             ndim=ndim, **kwargs)
28 
29     @property
30     def _box_func(self):
31         # TODO does not seems to be used at the moment (from the examples) ?
32         print("I am boxed")
33         return geom_factory
34 
35     # @property
36     # def _na_value(self):
37     #     return None
38     #
39     # @property
40     # def fill_value(self):
41     #     return tslib.iNaT
42 
43     # TODO
44     # def copy(self, deep=True, mgr=None):
45     #     """ copy constructor """
46     #     values = self.values
47     #     if deep:
48     #         values = values.copy(deep=True)
49     #     return self.make_block_same_class(values)
50 
51     def external_values(self):
52         """ we internally represent the data as a DatetimeIndex, but for
53         external compat with ndarray, export as a ndarray of Timestamps
54         """
55         #return np.asarray(self.values)
56         print("I am densified (external_values, {} elements)".format(len(self)))
57         return self.values.to_dense()
58 
59     def formatting_values(self, dtype=None):
60         """ return an internal format, currently just the ndarray
61         this should be the pure internal API format
62         """
63         return self.to_dense()
64 
65     def to_dense(self):
66         print("I am densified ({} elements)".format(len(self)))
67         return self.values.to_dense().view()
68 
69     def _getitem(self, key):
70         values = self.values[key]
71         return GeometryBlock(values, placement=slice(0, len(values), 1),
72                              ndim=1)
73 
74     # TODO is this needed?
75     # def get_values(self, dtype=None):
76     #     """
77     #     return object dtype as boxed values, as shapely objects
78     #     """
79     #     if is_object_dtype(dtype):
80     #         return lib.map_infer(self.values.ravel(),
81     #                              self._box_func).reshape(self.values.shape)
82     #     return self.values
83 
84     def to_native_types(self, slicer=None, na_rep=None, date_format=None,
85                         quoting=None, **kwargs):
86         """ convert to our native types format, slicing if desired """
87 
88         values = self.values
89         if slicer is not None:
90             values = values[slicer]
91 
92         values = to_shapely(values.data)
93 
94         return np.atleast_2d(values)
95 
96     # TODO needed for what?
97     def _can_hold_element(self, element):
98         # if is_list_like(element):
99         #     element = np.array(element)
100         #     return element.dtype == _NS_DTYPE or element.dtype == np.int64
101         return isinstance(element, BaseGeometry)
102 
103     def _slice(self, slicer):
104         """ return a slice of my values """
105         if isinstance(slicer, tuple):
106             col, loc = slicer
107             if not is_null_slice(col) and col != 0:
108                 raise IndexError("{0} only contains one item".format(self))
109             return self.values[loc]
110         return self.values[slicer]
111 
112     def take_nd(self, indexer, axis=0, new_mgr_locs=None, fill_tuple=None):
113         """
114         Take values according to indexer and return them as a block.bb
115         """
116         if fill_tuple is None:
117             fill_value = None
118         else:
119             fill_value = fill_tuple[0]
120 
121         # axis doesn't matter; we are really a single-dim object
122         # but are passed the axis depending on the calling routing
123         # if its REALLY axis 0, then this will be a reindex and not a take
124 
125         # TODO implement take_nd on GeometryArray
126         # new_values = self.values.take_nd(indexer, fill_value=fill_value)
127         new_values = self.values[indexer]
128 
129         # if we are a 1-dim object, then always place at 0
130         if self.ndim == 1:
131             new_mgr_locs = [0]
132         else:
133             if new_mgr_locs is None:
134                 new_mgr_locs = self.mgr_locs
135 
136         return self.make_block_same_class(new_values, new_mgr_locs)
137 
138     def eval(self, func, other, raise_on_error=True, try_cast=False,
139              mgr=None):
140         if func.__name__ == 'eq':
141             super(GeometryBlock, self).eval(
142                 func, other, raise_on_error=raise_on_error, try_cast=try_cast,
143                 mgr=mgr)
144         raise TypeError("{} not supported on geometry blocks".format(func.__name__))
145 
146 
147     def _astype(self, dtype, copy=False, errors='raise', values=None,
148                 klass=None, mgr=None):
149         """
150         Coerce to the new type (if copy=True, return a new copy)
151         raise on an except if raise == True
152         """
153 
154         if dtype == np.object_:
155             values = self.to_dense()
156         elif dtype == str:
157             values = np.array(list(map(str, self.to_dense())))
158         else:
159             if errors == 'raise':
160                 raise TypeError('cannot astype geometries')
161             else:
162                 values = self.to_dense()
163 
164         if copy:
165             values = values.copy()
166 
167         return self.make_block(values)
168 
169     # def should_store(self, value):
170     #     return (issubclass(value.dtype.type, np.uint64)
171     #             and value.dtype == self.dtype)
172 
173     def set(self, locs, values, check=False):
174         """
175         Modify Block in-place with new item value
176 
177         Returns
178         -------
179         None
180         """
181         if values.dtype != self.dtype:
182             # Workaround for numpy 1.6 bug
183             if isinstance(values, BaseGeometry):
184                 values = values.__geom__
185             else:
186                 raise ValueError()
187 
188             self.values[locs] = values
189 
190     def concat_same_type(self, to_concat, placement=None):
191         """
192         Concatenate list of single blocks of the same type.
193         """
194         values = concat([blk.values for blk in to_concat])
195         return self.make_block_same_class(
196             values, placement=placement or slice(0, len(values), 1))
197
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

diff --git a/geopandas/_block.py b/geopandas/_block.py
--- a/geopandas/_block.py
+++ b/geopandas/_block.py
@@ -124,7 +124,7 @@
 
         # TODO implement take_nd on GeometryArray
         # new_values = self.values.take_nd(indexer, fill_value=fill_value)
-        new_values = self.values[indexer]
+        new_values = self.values.take(indexer)
 
         # if we are a 1-dim object, then always place at 0
         if self.ndim == 1:

{"golden_diff": "diff --git a/geopandas/_block.py b/geopandas/_block.py\n--- a/geopandas/_block.py\n+++ b/geopandas/_block.py\n@@ -124,7 +124,7 @@\n \n         # TODO implement take_nd on GeometryArray\n         # new_values = self.values.take_nd(indexer, fill_value=fill_value)\n-        new_values = self.values[indexer]\n+        new_values = self.values.take(indexer)\n \n         # if we are a 1-dim object, then always place at 0\n         if self.ndim == 1:\n", "issue": "[cython] GeoSeries.reindex has wrong filling logic\n```\r\nIn [2]: s = GeoSeries([Point(1,1), Point(2,2)])\r\n\r\nIn [3]: s.reindex([0,1,2])\r\nOut[3]: I am densified (3 elements)\r\n\r\n0    POINT (1 1)\r\n1    POINT (2 2)\r\n2    POINT (2 2)\r\ndtype: object\r\n```\r\n\r\nwhile this should be `Point(1 1), Point(2 2), None`\r\n\r\nThe reason for this is because the `indexer` that is passed to `GeometryBlock.take_nd` (and currently thus `GeometryArray.take`) has the form of `array([ 0,  1, -1])`:\r\n\r\n```\r\n> /home/joris/scipy/geopandas/geopandas/_block.py(129)take_nd()\r\n-> new_values = self.values[indexer]\r\n(Pdb) l\r\n127  \t        # TODO implement take_nd on GeometryArray\r\n128  \t        # new_values = self.values.take_nd(indexer, fill_value=fill_value)\r\n129  ->\t        new_values = self.values[indexer]\r\n130  \t\r\n\r\n(Pdb) indexer\r\narray([ 0,  1, -1])\r\n```\n", "before_files": [{"content": "from __future__ import absolute_import, division, print_function\n\nimport numpy as np\n\nfrom pandas.core.internals import Block, NonConsolidatableMixIn\nfrom pandas.core.common import is_null_slice\nfrom shapely.geometry.base import geom_factory, BaseGeometry\n\nfrom .vectorized import GeometryArray, to_shapely, concat\n\n\nclass GeometryBlock(NonConsolidatableMixIn, Block):\n    \"\"\" implement a geometry block with uint pointers to C objects\n    as underlying data\"\"\"\n    __slots__ = ()\n\n    @property\n    def _holder(self):\n        return GeometryArray\n\n    def __init__(self, values, placement, ndim=2, **kwargs):\n\n        if not isinstance(values, self._holder):\n            raise TypeError(\"values must be a GeometryArray object\")\n\n        super(GeometryBlock, self).__init__(values, placement=placement,\n                                            ndim=ndim, **kwargs)\n\n    @property\n    def _box_func(self):\n        # TODO does not seems to be used at the moment (from the examples) ?\n        print(\"I am boxed\")\n        return geom_factory\n\n    # @property\n    # def _na_value(self):\n    #     return None\n    #\n    # @property\n    # def fill_value(self):\n    #     return tslib.iNaT\n\n    # TODO\n    # def copy(self, deep=True, mgr=None):\n    #     \"\"\" copy constructor \"\"\"\n    #     values = self.values\n    #     if deep:\n    #         values = values.copy(deep=True)\n    #     return self.make_block_same_class(values)\n\n    def external_values(self):\n        \"\"\" we internally represent the data as a DatetimeIndex, but for\n        external compat with ndarray, export as a ndarray of Timestamps\n        \"\"\"\n        #return np.asarray(self.values)\n        print(\"I am densified (external_values, {} elements)\".format(len(self)))\n        return self.values.to_dense()\n\n    def formatting_values(self, dtype=None):\n        \"\"\" return an internal format, currently just the ndarray\n        this should be the pure internal API format\n        \"\"\"\n        return self.to_dense()\n\n    def to_dense(self):\n        print(\"I am densified ({} elements)\".format(len(self)))\n        return self.values.to_dense().view()\n\n    def _getitem(self, key):\n        values = self.values[key]\n        return GeometryBlock(values, placement=slice(0, len(values), 1),\n                             ndim=1)\n\n    # TODO is this needed?\n    # def get_values(self, dtype=None):\n    #     \"\"\"\n    #     return object dtype as boxed values, as shapely objects\n    #     \"\"\"\n    #     if is_object_dtype(dtype):\n    #         return lib.map_infer(self.values.ravel(),\n    #                              self._box_func).reshape(self.values.shape)\n    #     return self.values\n\n    def to_native_types(self, slicer=None, na_rep=None, date_format=None,\n                        quoting=None, **kwargs):\n        \"\"\" convert to our native types format, slicing if desired \"\"\"\n\n        values = self.values\n        if slicer is not None:\n            values = values[slicer]\n\n        values = to_shapely(values.data)\n\n        return np.atleast_2d(values)\n\n    # TODO needed for what?\n    def _can_hold_element(self, element):\n        # if is_list_like(element):\n        #     element = np.array(element)\n        #     return element.dtype == _NS_DTYPE or element.dtype == np.int64\n        return isinstance(element, BaseGeometry)\n\n    def _slice(self, slicer):\n        \"\"\" return a slice of my values \"\"\"\n        if isinstance(slicer, tuple):\n            col, loc = slicer\n            if not is_null_slice(col) and col != 0:\n                raise IndexError(\"{0} only contains one item\".format(self))\n            return self.values[loc]\n        return self.values[slicer]\n\n    def take_nd(self, indexer, axis=0, new_mgr_locs=None, fill_tuple=None):\n        \"\"\"\n        Take values according to indexer and return them as a block.bb\n        \"\"\"\n        if fill_tuple is None:\n            fill_value = None\n        else:\n            fill_value = fill_tuple[0]\n\n        # axis doesn't matter; we are really a single-dim object\n        # but are passed the axis depending on the calling routing\n        # if its REALLY axis 0, then this will be a reindex and not a take\n\n        # TODO implement take_nd on GeometryArray\n        # new_values = self.values.take_nd(indexer, fill_value=fill_value)\n        new_values = self.values[indexer]\n\n        # if we are a 1-dim object, then always place at 0\n        if self.ndim == 1:\n            new_mgr_locs = [0]\n        else:\n            if new_mgr_locs is None:\n                new_mgr_locs = self.mgr_locs\n\n        return self.make_block_same_class(new_values, new_mgr_locs)\n\n    def eval(self, func, other, raise_on_error=True, try_cast=False,\n             mgr=None):\n        if func.__name__ == 'eq':\n            super(GeometryBlock, self).eval(\n                func, other, raise_on_error=raise_on_error, try_cast=try_cast,\n                mgr=mgr)\n        raise TypeError(\"{} not supported on geometry blocks\".format(func.__name__))\n\n\n    def _astype(self, dtype, copy=False, errors='raise', values=None,\n                klass=None, mgr=None):\n        \"\"\"\n        Coerce to the new type (if copy=True, return a new copy)\n        raise on an except if raise == True\n        \"\"\"\n\n        if dtype == np.object_:\n            values = self.to_dense()\n        elif dtype == str:\n            values = np.array(list(map(str, self.to_dense())))\n        else:\n            if errors == 'raise':\n                raise TypeError('cannot astype geometries')\n            else:\n                values = self.to_dense()\n\n        if copy:\n            values = values.copy()\n\n        return self.make_block(values)\n\n    # def should_store(self, value):\n    #     return (issubclass(value.dtype.type, np.uint64)\n    #             and value.dtype == self.dtype)\n\n    def set(self, locs, values, check=False):\n        \"\"\"\n        Modify Block in-place with new item value\n\n        Returns\n        -------\n        None\n        \"\"\"\n        if values.dtype != self.dtype:\n            # Workaround for numpy 1.6 bug\n            if isinstance(values, BaseGeometry):\n                values = values.__geom__\n            else:\n                raise ValueError()\n\n            self.values[locs] = values\n\n    def concat_same_type(self, to_concat, placement=None):\n        \"\"\"\n        Concatenate list of single blocks of the same type.\n        \"\"\"\n        values = concat([blk.values for blk in to_concat])\n        return self.make_block_same_class(\n            values, placement=placement or slice(0, len(values), 1))\n", "path": "geopandas/_block.py"}], "after_files": [{"content": "from __future__ import absolute_import, division, print_function\n\nimport numpy as np\n\nfrom pandas.core.internals import Block, NonConsolidatableMixIn\nfrom pandas.core.common import is_null_slice\nfrom shapely.geometry.base import geom_factory, BaseGeometry\n\nfrom .vectorized import GeometryArray, to_shapely, concat\n\n\nclass GeometryBlock(NonConsolidatableMixIn, Block):\n    \"\"\" implement a geometry block with uint pointers to C objects\n    as underlying data\"\"\"\n    __slots__ = ()\n\n    @property\n    def _holder(self):\n        return GeometryArray\n\n    def __init__(self, values, placement, ndim=2, **kwargs):\n\n        if not isinstance(values, self._holder):\n            raise TypeError(\"values must be a GeometryArray object\")\n\n        super(GeometryBlock, self).__init__(values, placement=placement,\n                                            ndim=ndim, **kwargs)\n\n    @property\n    def _box_func(self):\n        # TODO does not seems to be used at the moment (from the examples) ?\n        print(\"I am boxed\")\n        return geom_factory\n\n    # @property\n    # def _na_value(self):\n    #     return None\n    #\n    # @property\n    # def fill_value(self):\n    #     return tslib.iNaT\n\n    # TODO\n    # def copy(self, deep=True, mgr=None):\n    #     \"\"\" copy constructor \"\"\"\n    #     values = self.values\n    #     if deep:\n    #         values = values.copy(deep=True)\n    #     return self.make_block_same_class(values)\n\n    def external_values(self):\n        \"\"\" we internally represent the data as a DatetimeIndex, but for\n        external compat with ndarray, export as a ndarray of Timestamps\n        \"\"\"\n        #return np.asarray(self.values)\n        print(\"I am densified (external_values, {} elements)\".format(len(self)))\n        return self.values.to_dense()\n\n    def formatting_values(self, dtype=None):\n        \"\"\" return an internal format, currently just the ndarray\n        this should be the pure internal API format\n        \"\"\"\n        return self.to_dense()\n\n    def to_dense(self):\n        print(\"I am densified ({} elements)\".format(len(self)))\n        return self.values.to_dense().view()\n\n    def _getitem(self, key):\n        values = self.values[key]\n        return GeometryBlock(values, placement=slice(0, len(values), 1),\n                             ndim=1)\n\n    # TODO is this needed?\n    # def get_values(self, dtype=None):\n    #     \"\"\"\n    #     return object dtype as boxed values, as shapely objects\n    #     \"\"\"\n    #     if is_object_dtype(dtype):\n    #         return lib.map_infer(self.values.ravel(),\n    #                              self._box_func).reshape(self.values.shape)\n    #     return self.values\n\n    def to_native_types(self, slicer=None, na_rep=None, date_format=None,\n                        quoting=None, **kwargs):\n        \"\"\" convert to our native types format, slicing if desired \"\"\"\n\n        values = self.values\n        if slicer is not None:\n            values = values[slicer]\n\n        values = to_shapely(values.data)\n\n        return np.atleast_2d(values)\n\n    # TODO needed for what?\n    def _can_hold_element(self, element):\n        # if is_list_like(element):\n        #     element = np.array(element)\n        #     return element.dtype == _NS_DTYPE or element.dtype == np.int64\n        return isinstance(element, BaseGeometry)\n\n    def _slice(self, slicer):\n        \"\"\" return a slice of my values \"\"\"\n        if isinstance(slicer, tuple):\n            col, loc = slicer\n            if not is_null_slice(col) and col != 0:\n                raise IndexError(\"{0} only contains one item\".format(self))\n            return self.values[loc]\n        return self.values[slicer]\n\n    def take_nd(self, indexer, axis=0, new_mgr_locs=None, fill_tuple=None):\n        \"\"\"\n        Take values according to indexer and return them as a block.bb\n        \"\"\"\n        if fill_tuple is None:\n            fill_value = None\n        else:\n            fill_value = fill_tuple[0]\n\n        # axis doesn't matter; we are really a single-dim object\n        # but are passed the axis depending on the calling routing\n        # if its REALLY axis 0, then this will be a reindex and not a take\n\n        # TODO implement take_nd on GeometryArray\n        # new_values = self.values.take_nd(indexer, fill_value=fill_value)\n        new_values = self.values.take(indexer)\n\n        # if we are a 1-dim object, then always place at 0\n        if self.ndim == 1:\n            new_mgr_locs = [0]\n        else:\n            if new_mgr_locs is None:\n                new_mgr_locs = self.mgr_locs\n\n        return self.make_block_same_class(new_values, new_mgr_locs)\n\n    def eval(self, func, other, raise_on_error=True, try_cast=False,\n             mgr=None):\n        if func.__name__ == 'eq':\n            super(GeometryBlock, self).eval(\n                func, other, raise_on_error=raise_on_error, try_cast=try_cast,\n                mgr=mgr)\n        raise TypeError(\"{} not supported on geometry blocks\".format(func.__name__))\n\n\n    def _astype(self, dtype, copy=False, errors='raise', values=None,\n                klass=None, mgr=None):\n        \"\"\"\n        Coerce to the new type (if copy=True, return a new copy)\n        raise on an except if raise == True\n        \"\"\"\n\n        if dtype == np.object_:\n            values = self.to_dense()\n        elif dtype == str:\n            values = np.array(list(map(str, self.to_dense())))\n        else:\n            if errors == 'raise':\n                raise TypeError('cannot astype geometries')\n            else:\n                values = self.to_dense()\n\n        if copy:\n            values = values.copy()\n\n        return self.make_block(values)\n\n    # def should_store(self, value):\n    #     return (issubclass(value.dtype.type, np.uint64)\n    #             and value.dtype == self.dtype)\n\n    def set(self, locs, values, check=False):\n        \"\"\"\n        Modify Block in-place with new item value\n\n        Returns\n        -------\n        None\n        \"\"\"\n        if values.dtype != self.dtype:\n            # Workaround for numpy 1.6 bug\n            if isinstance(values, BaseGeometry):\n                values = values.__geom__\n            else:\n                raise ValueError()\n\n            self.values[locs] = values\n\n    def concat_same_type(self, to_concat, placement=None):\n        \"\"\"\n        Concatenate list of single blocks of the same type.\n        \"\"\"\n        values = concat([blk.values for blk in to_concat])\n        return self.make_block_same_class(\n            values, placement=placement or slice(0, len(values), 1))\n", "path": "geopandas/_block.py"}]}