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
However, there is a bug in save_ply: the invalid_mask calculation where np.isnan(opacities).any(axis=0) marks the entire mask as True, causing all data points to be invalid. This happens because opacities has shape (N,), and using axis=0 makes the any() function return a single boolean value instead of row-wise filtering.
Steps to Reproduce:
Run the code with an opacities array containing some NaN values.
Observe that invalid_mask becomes completely True, invalidating all rows. This means no points will be saved.
Hi, @MrNeRF @maturk
Thanks for adding
save_ply
(#234 #427).However, there is a bug in
save_ply
: theinvalid_mask
calculation wherenp.isnan(opacities).any(axis=0)
marks the entire mask as True, causing all data points to be invalid. This happens becauseopacities
has shape (N,), and usingaxis=0
makes theany()
function return a single boolean value instead of row-wise filtering.Steps to Reproduce:
invalid_mask
becomes completely True, invalidating all rows. This means no points will be saved.Suggested Fix:
Replace
np.isnan(opacities).any(axis=0) | np.isinf(opacities).any(axis=0)
with
np.isnan(opacities) | np.isinf(opacities)
.Version: Commit 1a1e0cc
Thanks for the great repo! Let me know if I can help with a fix.
The text was updated successfully, but these errors were encountered: