Skip to content

Commit 6d804d7

Browse files
committed
Use to_numpy() to convert pd.Series to np.array
The .values method isn't recommended anymore for pandas 1.0, see https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.Series.values.html#pandas.Series.values. Using to_numpy() instead.
1 parent db8f54f commit 6d804d7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pygmt/clib/conversion.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ def _as_array(vector):
241241
242242
"""
243243
if isinstance(vector, pandas.Series):
244-
return vector.values
244+
return vector.to_numpy()
245245
return np.asarray(vector)
246246

247247

0 commit comments

Comments
 (0)