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

total property for DVector #24

Closed asongtoruin closed 3 months ago

asongtoruin commented 4 months ago

Would it be possible to get a .total property added to DVector? I think it would be as simple as:

@property
def total(self):
    return self.data.sum().sum()

This would be super-useful for Land-Use in terms of being able to check the different processing stages, and I'm sure it would have wider use too. We can work around it if needs be, but this just feels as though it would be neater and as far as I can tell nothing similar already exists?

isaac-tfn commented 3 months ago

Added to working PR