Skip to content

SparseEfficiency #1238

@emanuel-schmid

Description

@emanuel-schmid

SparseEfficiencyWarning

Changing the sparsity structure of a csr_matrix is expensive. lil and dok are more efficient.

Occurrences

  • scipy.sparse._index:168
  • scipy.sparse._index:210

Raise in

  • climada.hazard.test.test_base
  • climada.engine.test.test_impact_calc

(4 times during tests)


SparseEfficiencyWarning

Comparing a sparse matrix with -2 using > is inefficient. Try using <= instead.

Occurrence

  • climada.entity.exposures.base:1465

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions