Skip to content

made list_to_matrix support empty inputs on matrices with static sizes#1309

Merged
alecjacobson merged 9 commits intolibigl:devfrom
mtao:master
Oct 10, 2019
Merged

made list_to_matrix support empty inputs on matrices with static sizes#1309
alecjacobson merged 9 commits intolibigl:devfrom
mtao:master

Conversation

@mtao
Copy link
Copy Markdown
Contributor

@mtao mtao commented Oct 9, 2019

Eigen dislikes resizing to (0,0) when a matrix has a static size in some dimension due to an assert.
list_to_matrix now bypasses this assert by checking the RowsAtCompileTime/ColsAtCompileTime and passing in the value that Eigen wants to see.

Check all that apply (change to [x])

  • All changes meet libigl style-guidelines.
  • Adds new .cpp file.
  • Adds corresponding unit test.
  • Adds corresponding python binding.
  • This is a minor change.

@jiangzhongshi jiangzhongshi changed the base branch from master to dev October 10, 2019 16:04
@jiangzhongshi
Copy link
Copy Markdown
Collaborator

I personally think an assertion failure here should be triggered since you cannot really expect to transform an empty vector into a matrix with random values.

@alecjacobson alecjacobson merged commit 47da86a into libigl:dev Oct 10, 2019
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.

4 participants