Skip to content

Commit

Permalink
ndarray_import dtype name computation: ensure that there is enoug…
Browse files Browse the repository at this point in the history
…h space for ``complex128``
  • Loading branch information
wjakob committed Oct 31, 2023
1 parent 905a18a commit fe2fbc6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/nb_ndarray.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -440,7 +440,7 @@ ndarray_handle *ndarray_import(PyObject *o, const ndarray_req *req,
return nullptr;

const char *prefix = nullptr;
char dtype[9];
char dtype[11];
if (dt.code == (uint8_t) dlpack::dtype_code::Bool) {
std::strcpy(dtype, "bool");
} else {
Expand Down

0 comments on commit fe2fbc6

Please sign in to comment.