MHKiT-MATLAB
MHKiT-MATLAB copied to clipboard
Loads: bin_statistics test fails due to inconsistent handling of empty bins (NaN vs 0)
In the test_bin_statistics test (currently disabled) there is a failure caused by comparisons of 0 to NaN. The underlying JSON data has NaN where bins are empty and the bin_statistics function returns zeros: https://github.com/MHKiT-Software/MHKiT-MATLAB/blob/31388bb0512b571c0044c4a3a7b3ca3ed0a1f60e/mhkit/tests/Loads_TestLoads.m#L5-L29
@hivanov-nrel do you have any suggestions on how to fix? Should empty bins return NaN or 0. Do you think this is a bug in the test or in the bin_statistics function?