Fix a comment and wrong indentation

This commit is contained in:
Ivan Smirnov 2016-07-18 22:37:42 +01:00
parent b51fa02cc3
commit b37985ee0c

View File

@ -134,8 +134,7 @@ public:
array(const buffer_info &info) { array(const buffer_info &info) {
auto& api = lookup_api(); auto& api = lookup_api();
// _dtype_from_pep3118 returns dtypes with padding fields in, however the array // _dtype_from_pep3118 returns dtypes with padding fields in, so we need to strip them
// constructor seems to then consume them, so we don't need to strip them ourselves
auto numpy_internal = module::import("numpy.core._internal"); auto numpy_internal = module::import("numpy.core._internal");
auto dtype_from_fmt = (object) numpy_internal.attr("_dtype_from_pep3118"); auto dtype_from_fmt = (object) numpy_internal.attr("_dtype_from_pep3118");
auto dtype = strip_padding_fields(dtype_from_fmt(pybind11::str(info.format))); auto dtype = strip_padding_fields(dtype_from_fmt(pybind11::str(info.format)));