Skip to content

Commit afeaa38

Browse files
committed
dtype defaults to an empty string, rather than None
1 parent 8883f3c commit afeaa38

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
@@ -169,7 +169,7 @@ def _to_numpy(data: Any) -> np.ndarray:
169169
}
170170

171171
# The expected numpy dtype for the result numpy array, but can be None.
172-
dtype = dtypes.get(str(getattr(data, "dtype", getattr(data, "type", None))))
172+
dtype = dtypes.get(str(getattr(data, "dtype", getattr(data, "type", ""))))
173173

174174
# pandas numeric dtypes were converted to np.object_ dtype prior pandas 2.2, and are
175175
# converted to suitable NumPy dtypes since pandas 2.2. Refer to the following link

0 commit comments

Comments
 (0)