File tree 1 file changed +3
-3
lines changed
1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -1475,7 +1475,7 @@ def virtualfile_from_vectors(
1475
1475
# 2 columns contains coordinates like longitude, latitude, or datetime string
1476
1476
# types.
1477
1477
for col , array in enumerate (arrays [2 :]):
1478
- if pd . api . types . is_string_dtype (array .dtype ):
1478
+ if np . issubdtype (array .dtype , np . str_ ):
1479
1479
columns = col + 2
1480
1480
break
1481
1481
@@ -1506,9 +1506,9 @@ def virtualfile_from_vectors(
1506
1506
strings = string_arrays [0 ]
1507
1507
elif len (string_arrays ) > 1 :
1508
1508
strings = np .array (
1509
- [" " .join (vals ) for vals in zip (* string_arrays , strict = True )]
1509
+ [" " .join (vals ) for vals in zip (* string_arrays , strict = True )],
1510
+ dtype = np .str_ ,
1510
1511
)
1511
- strings = np .asanyarray (a = strings , dtype = np .str_ )
1512
1512
self .put_strings (
1513
1513
dataset , family = "GMT_IS_VECTOR|GMT_IS_DUPLICATE" , strings = strings
1514
1514
)
You can’t perform that action at this time.
0 commit comments