You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, the code allows a user to create a biom table that contains NaNs. However, trying to use such a table frequently leads to obscure errors: the equality test doesn't work (because NaN != NaN), transform doesn't work for sparse representations (because 0/NaN is set to 0, not NaN, because transform doesn't touch zero entries in sparse matrix), and sometimes even doing an explicit NaN-aware compare (where you check whether the same positions contain NaN in two tables) fails (for a non-NaN-related reason :) because matrix.data's order is different depending on whether it was instantiated as sparse or not. (@wasade indicates that the usual way to handle NaNs in a biom table is to set them to zero, which makes these issues go away.)
Since NaNs can't be truly supported in the current code, as a user, I would like it a lot if I just got an error up front if I tried to make a biom table that contained a NaN, rather than hitting an inscrutable issue downstream.
The text was updated successfully, but these errors were encountered:
wasade
added a commit
to wasade/biom-format
that referenced
this issue
Dec 3, 2024
Currently, the code allows a user to create a biom table that contains NaNs. However, trying to use such a table frequently leads to obscure errors: the equality test doesn't work (because NaN != NaN), transform doesn't work for sparse representations (because 0/NaN is set to 0, not NaN, because transform doesn't touch zero entries in sparse matrix), and sometimes even doing an explicit NaN-aware compare (where you check whether the same positions contain NaN in two tables) fails (for a non-NaN-related reason :) because
matrix.data
's order is different depending on whether it was instantiated as sparse or not. (@wasade indicates that the usual way to handle NaNs in a biom table is to set them to zero, which makes these issues go away.)Since NaNs can't be truly supported in the current code, as a user, I would like it a lot if I just got an error up front if I tried to make a biom table that contained a NaN, rather than hitting an inscrutable issue downstream.
The text was updated successfully, but these errors were encountered: