libigl / libigl-python-bindings

libigl python bindings
https://libigl.github.io/libigl-python-bindings/
GNU General Public License v3.0
317 stars 62 forks source link

Massmatrix function in version 2.5.1 returns a zero matrix. #232

Closed mykakus closed 3 months ago

mykakus commented 3 months ago

Hi, I tried to compute massmatrix in 2.5.1 version but results are always zeros. Compressed Sparse Column sparse matrix of dtype 'float64' with 0 stored elements and shape (4394, 4394) While in 2.5.0. everything seems to be ok. <4394x4394 sparse matrix of type '<class 'numpy.float64'>' with 4394 stored elements in Compressed Sparse Column format>

alecjacobson commented 3 months ago

I can't reproduce this with:

import igl print(igl.version) V,F = igl.triangulated_grid(3,3) M = igl.massmatrix(V,F) print(M.max()) M = igl.massmatrix(V,F,igl.MASSMATRIX_TYPE_BARYCENTRIC) print(M.max()) M = igl.massmatrix(V,F,igl.MASSMATRIX_TYPE_VORONOI) print(M.max())

which prints

2.5.1 0.25 0.24999999999999997 0.25

Message ID: @.***>

mykakus commented 3 months ago

Thank you for your quick reply. It seems I was too hasty and forgot to mention that versions 2.5.0 and 2.5.1 were installed in different conda environments. Everything was resolved after I upgraded them with version 2.5.1.