Skip to content

Commit

Permalink
Added dtype from const char pointer ctor
Browse files Browse the repository at this point in the history
  • Loading branch information
aldanor committed Jul 24, 2016
1 parent d96d564 commit 01dfc40
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions include/pybind11/numpy.h
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,8 @@ class dtype : public object {
m_ptr = from_args(pybind11::str(format)).release().ptr();
}

dtype(const char *format) : dtype(std::string(format)) { }

dtype(list names, list formats, list offsets, size_t itemsize) {
dict args;
args["names"] = names;
Expand Down

0 comments on commit 01dfc40

Please sign in to comment.