mirror of
https://github.com/RYDE-WORK/pybind11.git
synced 2026-01-20 13:43:27 +08:00
The array(const buffer_info &info) constructor fails when given
complex types since their format string is 'Zd' or 'Zf' which has
a length of two and causes an error here:
if (info.format.size() != 1)
throw std::runtime_error("Unsupported buffer format!");
Fixed by allowing format sizes of one and two.