Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
gaoqiong
pybind11
Commits
3e426344
Commit
3e426344
authored
Dec 15, 2015
by
Wenzel Jakob
Browse files
Merge pull request #32 from polygon/fix_complex_arrays
Fixed py:array constructor from failing for complex types
parents
e52cf8ae
ab92eb37
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
include/pybind11/numpy.h
include/pybind11/numpy.h
+1
-1
No files found.
include/pybind11/numpy.h
View file @
3e426344
...
...
@@ -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"
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment