Commit 3e426344 by Wenzel Jakob

Merge pull request #32 from polygon/fix_complex_arrays

Fixed py:array constructor from failing for complex types
parents e52cf8ae ab92eb37
......@@ -96,7 +96,7 @@ public:
array(const buffer_info &info) {
API& api = lookup_api();
if (info.format.size() != 1)
if ((info.format.size() < 1) || (info.format.size() > 2))
throw std::runtime_error("Unsupported buffer format!");
int fmt = (int) info.format[0];
if (info.format == "Zd")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment