You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "jorisvandenbossche (via GitHub)" <gi...@apache.org> on 2026/10/01 12:39:19 UTC

Re: [PR] GH-51652: [Python] Add NumPy StringDType to Arrow conversion [arrow]

jorisvandenbossche commented on code in PR #51157:
URL: https://github.com/apache/arrow/pull/51157#discussion_r4155425767


##########
python/pyarrow/src/arrow/python/numpy_to_arrow.cc:
##########
@@ -342,6 +346,11 @@ Status NumPyConverter::Convert() {
     return Status::Invalid("Must pass data type for non-object arrays");
   }
 
+  if (dtype_->type_num == NPY_VSTRING && !is_string_or_string_view(type_->id())) {
+    return Status::TypeError("Expected an Arrow string type for NumPy StringDType, got ",
+                             type_->ToString());

Review Comment:
   Opened https://github.com/apache/arrow/issues/51678 to keep track of this in general



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org