@@ -565,8 +565,6 @@ def _create_pred_input_plot(
565565 vline_kwargs = {"color" : "k" , "linestyle" : ":" , "label" : "Observation" }
566566 if vspan_kwargs is None :
567567 vspan_kwargs = {"color" : "k" , "alpha" : 0.1 }
568- x_pred = x_pred [0 ]
569- x_pred_error = x_pred_error [0 ]
570568 axes .axvline (x_pred , ** vline_kwargs )
571569 axes .axvspan (x_pred - x_pred_error , x_pred + x_pred_error , ** vspan_kwargs )
572570 return axes
@@ -1285,15 +1283,15 @@ def plot_individual_scatterplots(
12851283 label = group ,
12861284 )
12871285 axes = _create_pred_input_plot (
1288- pred_input_data ["mean" ][feature ].values ,
1289- pred_input_data ["error" ][feature ].values ,
1286+ pred_input_data ["mean" ][feature ].to_numpy ()[ 0 ] ,
1287+ pred_input_data ["error" ][feature ].to_numpy ()[ 0 ] ,
12901288 axes ,
12911289 )
12921290 axes = _create_pred_output_plot (
12931291 x_sub_data ,
12941292 y_sub_data ,
1295- pred_input_data ["mean" ][feature ].values ,
1296- pred_input_data ["error" ][feature ].values ,
1293+ pred_input_data ["mean" ][feature ].to_numpy ()[ 0 ] ,
1294+ pred_input_data ["error" ][feature ].to_numpy ()[ 0 ] ,
12971295 axes ,
12981296 hline_kwargs = {"color" : colors [idx ], "linestyle" : ":" },
12991297 )
@@ -1417,8 +1415,8 @@ def plot_merged_scatterplots(
14171415 axes = _create_pred_output_plot (
14181416 x_data ,
14191417 y_data ,
1420- pred_input_data ["mean" ][feature ].values ,
1421- pred_input_data ["error" ][feature ].values ,
1418+ pred_input_data ["mean" ][feature ].to_numpy ()[ 0 ] ,
1419+ pred_input_data ["error" ][feature ].to_numpy ()[ 0 ] ,
14221420 axes ,
14231421 hline_kwargs = {
14241422 "color" : COLOR_COMBINED_GROUPS ,
@@ -1438,8 +1436,8 @@ def plot_merged_scatterplots(
14381436 axes = _create_pred_output_plot (
14391437 x_data .loc [group ],
14401438 y_data .loc [group ],
1441- pred_input_data ["mean" ][feature ].values ,
1442- pred_input_data ["error" ][feature ].values ,
1439+ pred_input_data ["mean" ][feature ].to_numpy ()[ 0 ] ,
1440+ pred_input_data ["error" ][feature ].to_numpy ()[ 0 ] ,
14431441 axes ,
14441442 hline_kwargs = {"color" : colors [idx ], "linestyle" : ":" },
14451443 )
@@ -1457,14 +1455,14 @@ def plot_merged_scatterplots(
14571455 axes = _create_pred_output_plot (
14581456 x_data .loc [group ],
14591457 y_data .loc [group ],
1460- pred_input_data ["mean" ][feature ].values ,
1461- pred_input_data ["error" ][feature ].values ,
1458+ pred_input_data ["mean" ][feature ].to_numpy ()[ 0 ] ,
1459+ pred_input_data ["error" ][feature ].to_numpy ()[ 0 ] ,
14621460 axes ,
14631461 hline_kwargs = {"color" : colors [idx ], "linestyle" : ":" },
14641462 )
14651463 axes = _create_pred_input_plot (
1466- pred_input_data ["mean" ][feature ].values ,
1467- pred_input_data ["error" ][feature ].values ,
1464+ pred_input_data ["mean" ][feature ].to_numpy ()[ 0 ] ,
1465+ pred_input_data ["error" ][feature ].to_numpy ()[ 0 ] ,
14681466 axes ,
14691467 )
14701468 set_plot_appearance (
@@ -1608,8 +1606,8 @@ def plot_target_distributions(
16081606 (y_lin , y_pdf ) = target_pdf (
16091607 x_sub_data ,
16101608 y_sub_data ,
1611- pred_input_data ["mean" ][feature ].values ,
1612- pred_input_data ["error" ][feature ].values ,
1609+ pred_input_data ["mean" ][feature ].to_numpy ()[ 0 ] ,
1610+ pred_input_data ["error" ][feature ].to_numpy ()[ 0 ] ,
16131611 )
16141612
16151613 # Plots
@@ -1632,8 +1630,8 @@ def plot_target_distributions(
16321630 (y_min , y_mean , y_max ) = get_constraint (
16331631 x_sub_data ,
16341632 y_sub_data ,
1635- pred_input_data ["mean" ][feature ].values ,
1636- pred_input_data ["error" ][feature ].values ,
1633+ pred_input_data ["mean" ][feature ].to_numpy ()[ 0 ] ,
1634+ pred_input_data ["error" ][feature ].to_numpy ()[ 0 ] ,
16371635 confidence_level = cfg ["confidence_level" ],
16381636 )
16391637 y_error = np .max ([y_max - y_mean , y_mean - y_min ])
@@ -2021,9 +2019,8 @@ def get_constraint_from_df(
20212019 label = training_data .y .columns [0 ]
20222020 feature = training_data .x .columns [0 ]
20232021 (x_data , y_data ) = get_xy_data_without_nans (training_data , feature , label )
2024- x_pred = pred_input_data ["mean" ][feature ].values [0 ]
2025- x_pred_error = pred_input_data ["error" ][feature ].values [0 ]
2026-
2022+ x_pred = pred_input_data ["mean" ][feature ].to_numpy ()[0 ]
2023+ x_pred_error = pred_input_data ["error" ][feature ].to_numpy ()[0 ]
20272024 # Calculate constraint
20282025 constraint = get_constraint (
20292026 x_data ,
0 commit comments