CLIMADA-project / climada_python

Python (3.8+) version of CLIMADA
GNU General Public License v3.0
291 stars 115 forks source link

Ensure csr matrices are in "canonical format" in Hazard objects #893

Open peanutfun opened 2 weeks ago

peanutfun commented 2 weeks ago

Changes proposed in this PR:

This PR fixes inconsistencies in the csr matrix reported in #891, but does not fix the problem of unintentionally summed values (it just ensures this problem is visible when looking at the matrix data).

PR Author Checklist

PR Reviewer Checklist

peanutfun commented 2 weeks ago

Petals compatibility tests are failing because we sometimes assign LIL matrices there instead of CSR matrices. This can be fixed before or after merging this PR.

peanutfun commented 2 weeks ago

Petals compatibility is addressed here: CLIMADA-project/climada_petals#129

peanutfun commented 2 weeks ago

@chahank What do you think about this updated version? I still have to adapt the test.

peanutfun commented 17 hours ago

@chahank Waiting for your responses to move forward 😇 👉 👈