Skip to content

Commit ebc34ea

Browse files
authored
fix: Fixed null pointer error for Numpy inputs to Tyrus (#149)
* Fixed null pointer error for numpy inputs to Tyrus * Black
1 parent 4abbbe7 commit ebc34ea

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/trustyai/utils/tyrus.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -129,9 +129,11 @@ def __init__(
129129
remain there after execution is finished.
130130
"""
131131
self.model = model
132-
self.inputs = one_input_convert(inputs)
133-
self.outputs = one_output_convert(outputs)
134-
self.background = many_inputs_convert(background)
132+
self.inputs = one_input_convert(inputs, feature_names=model.feature_names)
133+
self.outputs = one_output_convert(outputs, names=model.output_names)
134+
self.background = many_inputs_convert(
135+
background, feature_names=model.feature_names
136+
)
135137
self.fraction_counterfactuals_to_display = max(
136138
0, min(1, kwargs.get("fraction_counterfactuals_to_display", 0.1))
137139
)

0 commit comments

Comments
 (0)