base_nuts.hpp:110 — Unnecessary .transpose() on column vector
Open
Beginner friendly
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 2.8k
- Forks
- 388
- Avg merge
- 2d 17h
- Merged PRs (30d)
- 15
Description
Eigen::VectorXd rho = this->z_.p.transpose();
z_.p is a VectorXd (D×1). .transpose() produces a RowVectorXd (1×D), which is
then assigned to a VectorXd (D×1). This works due to Eigen's dynamic resizing
but could trigger debug assertions in strict Eigen builds. Should just be rho
= this->z_.p;.
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
Review base_nuts.hpp around line 110, focusing on the assignment from z_.p to rho. Confirm that rho uses the VectorXd directly without transpose and that the change compiles successfully under strict Eigen assertions.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- backend
- Issue type
- Refactor
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 86/100