Transport-for-the-North / caf.core

Core classes and definitions for CAF family of tools
GNU General Public License v3.0
0 stars 1 forks source link

filter warnings for SegmentationWarnings #10

Open isaac-tfn opened 10 months ago

isaac-tfn commented 10 months ago

I think it would be a good idea to have as an environment variable whether to treat SegmentationWarnings as warnings or errors. These warnings are raised when an operation alters a segmentation, for example when adding two Dvectors an join is performed between the two DVectors so the resulting segmentation will be a union of the two segmentations, and can drop from the original DVector in the case of subsets. Currently this is an argument for the generic_dunder method and validate_segmentation, but neither of these methods are supposed to be directly called by the user.