File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 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(
14751475 # 2 columns contains coordinates like longitude, latitude, or datetime string
14761476 # types.
14771477 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_ ):
14791479 columns = col + 2
14801480 break
14811481
@@ -1506,9 +1506,9 @@ def virtualfile_from_vectors(
15061506 strings = string_arrays [0 ]
15071507 elif len (string_arrays ) > 1 :
15081508 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_ ,
15101511 )
1511- strings = np .asanyarray (a = strings , dtype = np .str_ )
15121512 self .put_strings (
15131513 dataset , family = "GMT_IS_VECTOR|GMT_IS_DUPLICATE" , strings = strings
15141514 )
You can’t perform that action at this time.
0 commit comments