We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7ae437f commit bf8c9a5Copy full SHA for bf8c9a5
pygmt/clib/conversion.py
@@ -181,16 +181,11 @@ def _to_ndarray(array: Any) -> np.ndarray:
181
"Float64": np.float64,
182
}
183
)
184
+ if hasattr(array, "isna") and array.isna().any():
185
+ array = array.astype(np.float64)
186
- if (
- hasattr(array, "isna")
187
- and array.isna().any()
188
- and Version(pd.__version__) < Version("2.2")
189
- ):
190
- array = np.ascontiguousarray(array.astype(np.float64))
191
- else:
192
- vec_dtype = str(getattr(array, "dtype", ""))
193
- array = np.ascontiguousarray(array, dtype=dtypes.get(vec_dtype))
+ vec_dtype = str(getattr(array, "dtype", ""))
+ array = np.ascontiguousarray(array, dtype=dtypes.get(vec_dtype))
194
return array
195
196
0 commit comments