Ensure csr matrices are in "canonical format" before impact calculation by peanutfun · Pull Request #893 · CLIMADA-project/climada_python

added 2 commits

June 14, 2024 12:10
* Add getter/setter attributes for csr_matrices in Hazard.
* Check format and sum duplicates when assigning matrices.
* Update unit tests.

@peanutfun peanutfun marked this pull request as ready for review

June 14, 2024 12:20

@peanutfun

@peanutfun

chahank

chahank

chahank

Co-authored-by: Chahan M. Kropf <chahan.kropf@usys.ethz.ch>

@peanutfun

@peanutfun

@peanutfun peanutfun marked this pull request as ready for review

June 21, 2024 13:32

chahank

chahank

chahank

chahank

chahank

@peanutfun @chahank

Co-authored-by: Chahan M. Kropf <chahan.kropf@usys.ethz.ch>

@peanutfun

@peanutfun

* Only call `Hazard.check_matrices` from `ImpactCalc.__init__`.
* Update tests and docstrings accordingly.

@peanutfun peanutfun changed the title Ensure csr matrices are in "canonical format" in Hazard objects Ensure csr matrices are in "canonical format" before impact calculation

Jul 15, 2024

chahank

@peanutfun

@peanutfun