Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed py:array constructor from failing for complex types #32

Merged
merged 1 commit into from
Dec 15, 2015

Conversation

polygon
Copy link
Contributor

@polygon polygon commented Dec 15, 2015

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.

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.
@wjakob
Copy link
Member

wjakob commented Dec 15, 2015

Oops, good catch--thanks!

wjakob pushed a commit that referenced this pull request Dec 15, 2015
Fixed py:array constructor from failing for complex types
@wjakob wjakob merged commit 3e42634 into pybind:master Dec 15, 2015
@polygon polygon deleted the fix_complex_arrays branch December 15, 2015 12:53
EricCousineau-TRI added a commit to EricCousineau-TRI/pybind11 that referenced this pull request Nov 19, 2019
…m-cache

Remove deregistered objects from the inactive overload cache
EricCousineau-TRI pushed a commit to EricCousineau-TRI/pybind11 that referenced this pull request Jan 14, 2020
…pybind#35)

Reverts pybind#32

This change cause segfaults on Mac CI: RobotLocomotion/drake#12105

This was PR'd against this pybind11 fork and merged, then incorporated into a Drake PR as a commit update.
The Drake PR was then reverted in #12105, but the commit was not reverted in pybind11 itself, hence this PR.
sschnug pushed a commit to sschnug/pybind11 that referenced this pull request Aug 2, 2024
* fix: drop unneeded function

* docs: add some notes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants