pybind / pybind/pybind11

Full support for Eigen::Map(ped) types

Open
#1,402 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C++
Stars
18k
Forks
2.3k
Avg merge
5d 17h
Merged PRs (30d)
10

Description

(and Eigen::TensorMap)

AFAICT pybind11 supports Eigen maps ('views') as return values and not as arguments (I get a compilation error about a delete function and in a nearby comment it says that maps are not supported as arguments but without an explanation as to why) and I don't see why this should be the case. In the documentation you recommend the use of the Eigen::Ref template. However Refs are slightly heavier and at the same time less versatile (in certain contexts I care about, like adapting/viewing memory of arbitrary yet 'compatible' objects as Eigen types, e.g. OpenCV Mats) than Maps and my codebase is already based on (that is to say littered with:) Maps so changing all that is not a (happy) option.
Could you add this support?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the reported compilation error for Eigen::Map arguments and compare it with the existing Eigen::Ref guidance and support for map return values. Investigate the same question for Eigen::TensorMap; done means both map types can be accepted as arguments without the reported delete-function error.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, python
Domain
devtools
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.