Skip to content

Conversation

@adler-j
Copy link
Contributor

@adler-j adler-j commented Dec 15, 2015

Adds more conversions, now supports all errors in boost::python and some more.

@adler-j adler-j force-pushed the issue-37__convert_exception branch from d19f32c to 2b9fdbe Compare December 15, 2015 10:56
@adler-j
Copy link
Contributor Author

adler-j commented Dec 15, 2015

Fixed compilation bug and rebased, should be fine now.

@wjakob
Copy link
Member

wjakob commented Dec 15, 2015

what was the issue out of curiosity?

@adler-j
Copy link
Contributor Author

adler-j commented Dec 15, 2015

std::system_error is not included in the stdexcept header, thus compilation failed on Linux (on windows it seems it was magically included somehow). I fixed it by simply removing it for now, extra includes would slow compilation and system_error isn't that common. If we want it, we can add an include and conversion from std::sytem_error to SystemError. Perhaps in the long run you could even allow users to configure this themselves.

@adler-j
Copy link
Contributor Author

adler-j commented Dec 15, 2015

A short note is that I fail to compile the library in full (since I'm using VS2013), but i can include it properly in a package. Perhaps keeping this would be a nice feature (for me, I would upgrade if I could, but CUDA does not support VS2015 as of yet) I understand if you do not want that however.

@wjakob
Copy link
Member

wjakob commented Dec 15, 2015

There is some particular line of code that is causing VS2013 to crash -- it might be worth investigating that at some point to see if there is an equivalent statement that still allows it to continue. However, I must admit that it's not a big priority for me (though I would accept a PR if the change is not too big).

@wjakob
Copy link
Member

wjakob commented Dec 15, 2015

thanks!

wjakob pushed a commit that referenced this pull request Dec 15, 2015
@wjakob wjakob merged commit 6621c17 into pybind:master Dec 15, 2015
EricCousineau-TRI added a commit to EricCousineau-TRI/pybind11 that referenced this pull request Apr 9, 2020
mwoehlke-kitware added a commit to mwoehlke-kitware/pybind11 that referenced this pull request Jun 29, 2022
When converting an array to an Eigen matrix, ignore the strides is any
dimension size is 0. If the array is empty, the strides aren't relevant,
and especially numpy ≥ 1.23 explicitly sets the strides to 0 in this
case. (See numpy commit dd5ab7b11520.)

Update tests to verify that this works, and continues to work. (This
test likely would have caught the behavior change with numpy 1.23.) This
expands on the tests added by pybind#38, but also reverts the logic change
from that PR, as it is no longer needed, and brings the code closer in
line with upstream, since pybind#38 was never pushed upstream.
mwoehlke-kitware added a commit to mwoehlke-kitware/pybind11 that referenced this pull request Jun 29, 2022
When converting an array to an Eigen matrix, ignore the strides if any
dimension size is 0. If the array is empty, the strides aren't relevant,
and especially numpy ≥ 1.23 explicitly sets the strides to 0 in this
case. (See numpy commit dd5ab7b11520.)

Update tests to verify that this works, and continues to work. (This
test likely would have caught the behavior change with numpy 1.23.) This
expands on the tests added by pybind#38, but also reverts the logic change
from that PR, as it is no longer needed, and brings the code closer in
line with upstream, since pybind#38 was never pushed upstream.
mwoehlke-kitware added a commit to mwoehlke-kitware/pybind11 that referenced this pull request Jun 29, 2022
When converting an array to an Eigen matrix, ignore the strides if any
dimension size is 0. If the array is empty, the strides aren't relevant,
and especially numpy ≥ 1.23 explicitly sets the strides to 0 in this
case. (See numpy commit dd5ab7b11520.)

Update tests to verify that this works, and continues to work. (This
test likely would have caught the behavior change with numpy 1.23.) This
expands on the tests added by pybind#38, but also reverts the logic change
from that PR, as it is no longer needed, and brings the code closer in
line with upstream, since pybind#38 was never pushed upstream.
sschnug pushed a commit to sschnug/pybind11 that referenced this pull request Aug 2, 2024
…d#38)

Bumps [conda-incubator/setup-miniconda](https://github.com/conda-incubator/setup-miniconda) from v2.0.0 to v2.1.1.
- [Release notes](https://github.com/conda-incubator/setup-miniconda/releases)
- [Changelog](https://github.com/conda-incubator/setup-miniconda/blob/master/CHANGELOG.md)
- [Commits](conda-incubator/setup-miniconda@v2.0.0...35d1405)

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
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