Skip to content

Commit 06667b8

Browse files
authored
Fix various warnings (#48)
* Fix pyarrow, hypothesis deprecation warnings * Fix warning in test
1 parent 0a4e08e commit 06667b8

File tree

3 files changed

+273
-268
lines changed

3 files changed

+273
-268
lines changed

spatialpandas/geometry/base.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -130,11 +130,11 @@ def name(self):
130130

131131
class Geometry:
132132
def __init__(self, data, dtype=None):
133-
if isinstance(data, pa.ArrayValue):
134-
# Use arrow ArrayValue as is
133+
if isinstance(data, pa.Scalar):
134+
# Use arrow Scalar as is
135135
self.data = data
136136
else:
137-
# Convert to ArrayValue
137+
# Convert to arrow Scalar
138138
self.data = pa.array([data])[0]
139139

140140
def __repr__(self):

tests/geometry/test_construction.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ def test_construct_pointarray_tuple():
3333

3434

3535
def test_construct_pointarray_2d_with_None():
36-
src_array = np.array([None, [2, 3], [4, 5], None])
36+
src_array = np.array([None, [2, 3], [4, 5], None], dtype=object)
3737
expected_xs = np.array([np.nan, 2, 4, np.nan], dtype=np.float64)
3838
expected_ys = np.array([np.nan, 3, 5, np.nan], dtype=np.float64)
3939

0 commit comments

Comments
 (0)