[NOT A BUG] Links/similarities with R's cpp11
Open
Nobody has claimed this yet.
triage
- Dominant language
- C++
- Stars
- 18k
- Forks
- 2.3k
- Avg merge
- 5d 17h
- Merged PRs (30d)
- 10
Description
Required prerequisites
- Make sure you've read the documentation. Your issue may be addressed there.
- Search the issue tracker and Discussions to verify that this hasn't already been reported. +1 or comment there if it has.
- Consider asking first in the Gitter chat room or in a Discussion.
What version (or hash if on master) of pybind11 are you using?
ec1b57c50c72a7c2ef4aa3b14d7723918da4235e
Problem description
Not a problem. This is similar to R's cpp11 (https://cpp11.r-lib.org/). I wonder how easy would it be to have some convergence with cpp11
This might interest @DavisVaughan @s3alfisc @lrberge
Reproducible example code
// say we can easily port this R-cpp11 code
// then translating linear algebra between R and Python is "free"
#include <cpp11.hpp>
using namespace cpp11;
doubles_matrix<> XtX(doubles_matrix<> X)
{
int NX = X.nrow();
int MX = X.ncol();
writable::doubles_matrix<> R(MX, MX);
for (int i = 0; i < MX; i++)
{
for (int j = 0; j < MX; j++)
{
for (int k = 0; k < NX; k++)
{
R(i, j) += X(k, i) * X(k, j);
}
}
}
return R;
}
Is this a regression? Put the last known working version here if it is.
Not a regression
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by comparing the pybind11 documentation with R's cpp11 documentation and the linked cpp11 example. The issue does not identify files, tests, a specific entry point, or an acceptance criterion, so the intended convergence and definition of done would need to be clarified first.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp, python
- Domain
- backend-api-design
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100