File tree Expand file tree Collapse file tree 2 files changed +4
-20
lines changed
Expand file tree Collapse file tree 2 files changed +4
-20
lines changed Original file line number Diff line number Diff line change @@ -89,12 +89,12 @@ def __post_init__(self, assign_centroids):
8989 """Prepare input data"""
9090 if not isinstance (self .data , pd .DataFrame ):
9191 if isinstance (self .data , pd .Series ):
92- raise ValueError (
92+ raise TypeError (
9393 "You passed a pandas Series as 'data'. Please transform it into a "
9494 "dataframe with Series.to_frame() and make sure that columns "
9595 "correctly indicate locations and indexes events."
9696 )
97- raise ValueError ("'data' must be a pandas.DataFrame" )
97+ raise TypeError ("'data' must be a pandas.DataFrame" )
9898
9999 if assign_centroids :
100100 self .exposure .assign_centroids (self .hazard )
@@ -201,22 +201,6 @@ def __post_init__(self):
201201 ).impact (assign_centroids = True , save_mat = True )
202202 self ._impact_label = f"Impact [{ self .input .exposure .value_unit } ]"
203203
204- def plot_impf_set (self , ** plot_kwargs ):
205- """Plot the optimized impact functions
206-
207- This calls the plot function of the respective impact function set.
208-
209- Parameters
210- ----------
211- plot_kwargs
212- Plotting keyword arguments passed to the underlying plotting method.
213-
214- See Also
215- --------
216- :py:meth:`~climada.entity.impact_funcs.impact_func_set.ImpactFuncSet.plot`
217- """
218- return self .impf_set .plot (** plot_kwargs )
219-
220204 def plot_impf_variability (
221205 self ,
222206 cost_func_diff : float = 0.1 ,
Original file line number Diff line number Diff line change 26222622 "from climada.util.calibrate import OutputEvaluator\n",
26232623 "\n",
26242624 "output_eval = OutputEvaluator(input, bayes_output)\n",
2625- "output_eval.plot_impf_set ()\n"
2625+ "output_eval.impf_set.plot ()\n"
26262626 ]
26272627 },
26282628 {
33813381 "\n",
33823382 " # Evaluate output\n",
33833383 " output_eval = OutputEvaluator(input, bayes_output)\n",
3384- " output_eval.plot_impf_set ()\n",
3384+ " output_eval.impf_set.plot ()\n",
33853385 "\n",
33863386 " plt.figure() # New figure because seaborn.heatmap draws into active axes\n",
33873387 " output_eval.plot_event_region_heatmap(\n",
You can’t perform that action at this time.
0 commit comments