Skip to content

Commit 0234238

Browse files
committed
fix aggressive caching
1 parent 56f3715 commit 0234238

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

climada/trajectories/riskperiod.py

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -537,28 +537,28 @@ def E1H1V1(self) -> Impact:
537537

538538
### Impact Matrices arrays ####
539539

540-
@lazy_property
540+
@property
541541
def imp_mats_H0V0(self) -> list:
542542
"""List of `time_points` impact matrices with changing exposure, starting hazard and starting vulnerability."""
543543
return self.interpolation_strategy.interp_over_exposure_dim(
544544
self.E0H0V0.imp_mat, self.E1H0V0.imp_mat, self.time_points
545545
)
546546

547-
@lazy_property
547+
@property
548548
def imp_mats_H1V0(self) -> list:
549549
"""List of `time_points` impact matrices with changing exposure, future hazard and starting vulnerability."""
550550
return self.interpolation_strategy.interp_over_exposure_dim(
551551
self.E0H1V0.imp_mat, self.E1H1V0.imp_mat, self.time_points
552552
)
553553

554-
@lazy_property
554+
@property
555555
def imp_mats_H0V1(self) -> list:
556556
"""List of `time_points` impact matrices with changing exposure, starting hazard and future vulnerability."""
557557
return self.interpolation_strategy.interp_over_exposure_dim(
558558
self.E0H0V1.imp_mat, self.E1H0V1.imp_mat, self.time_points
559559
)
560560

561-
@lazy_property
561+
@property
562562
def imp_mats_H1V1(self) -> list:
563563
"""List of `time_points` impact matrices with changing exposure, future hazard and future vulnerability."""
564564
return self.interpolation_strategy.interp_over_exposure_dim(
@@ -569,28 +569,28 @@ def imp_mats_H1V1(self) -> list:
569569

570570
########## Base EAI ###########
571571

572-
@lazy_property
572+
@property
573573
def per_date_eai_H0V0(self) -> np.ndarray:
574574
"""Expected annual impacts for changing exposure, starting hazard and starting vulnerability."""
575575
return calc_per_date_eais(
576576
self.imp_mats_H0V0, self.snapshot_start.hazard.frequency
577577
)
578578

579-
@lazy_property
579+
@property
580580
def per_date_eai_H1V0(self) -> np.ndarray:
581581
"""Expected annual impacts for changing exposure, future hazard and starting vulnerability."""
582582
return calc_per_date_eais(
583583
self.imp_mats_H1V0, self.snapshot_end.hazard.frequency
584584
)
585585

586-
@lazy_property
586+
@property
587587
def per_date_eai_H0V1(self) -> np.ndarray:
588588
"""Expected annual impacts for changing exposure, starting hazard and future vulnerability."""
589589
return calc_per_date_eais(
590590
self.imp_mats_H0V1, self.snapshot_start.hazard.frequency
591591
)
592592

593-
@lazy_property
593+
@property
594594
def per_date_eai_H1V1(self) -> np.ndarray:
595595
"""Expected annual impacts for changing exposure, future hazard and future vulnerability."""
596596
return calc_per_date_eais(
@@ -601,22 +601,22 @@ def per_date_eai_H1V1(self) -> np.ndarray:
601601

602602
######### Specific AAIs ##########
603603

604-
@lazy_property
604+
@property
605605
def per_date_aai_H0V0(self) -> np.ndarray:
606606
"""Average annual impacts for changing exposure, starting hazard and starting vulnerability."""
607607
return calc_per_date_aais(self.per_date_eai_H0V0)
608608

609-
@lazy_property
609+
@property
610610
def per_date_aai_H1V0(self) -> np.ndarray:
611611
"""Average annual impacts for changing exposure, future hazard and starting vulnerability."""
612612
return calc_per_date_aais(self.per_date_eai_H1V0)
613613

614-
@lazy_property
614+
@property
615615
def per_date_aai_H0V1(self) -> np.ndarray:
616616
"""Average annual impacts for changing exposure, starting hazard and future vulnerability."""
617617
return calc_per_date_aais(self.per_date_eai_H0V1)
618618

619-
@lazy_property
619+
@property
620620
def per_date_aai_H1V1(self) -> np.ndarray:
621621
"""Average annual impacts for changing exposure, future hazard and future vulnerability."""
622622
return calc_per_date_aais(self.per_date_eai_H1V1)

0 commit comments

Comments
 (0)