Skip to content

Commit

Permalink
make more numpy-thonic
Browse files Browse the repository at this point in the history
  • Loading branch information
geoffreyangus committed Jun 6, 2022
1 parent 9d25b27 commit 5ba51a4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ludwig/features/binary_feature.py
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,7 @@ def postprocess_predictions(
if probabilities_col in result:
result[probabilities_col] = backend.df_engine.map_objects(
result[probabilities_col],
lambda prob: np.array([1 - prob, prob]).astype(result[probabilities_col].dtype),
lambda prob: np.array([1 - prob, prob], dtype=result[probabilities_col].dtype),
)

false_col = f"{probabilities_col}_{class_names[0]}"
Expand Down

0 comments on commit 5ba51a4

Please sign in to comment.