Skip to content

Commit 46a4c23

Browse files
committed
Add fix for np.ndarray returns in MM
1 parent 5529d1a commit 46a4c23

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/sasctl/pzmm/writeScoreCode.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -475,7 +475,9 @@ def score{modelPrefix}({inputVarList}):
475475
elif not isH2OModel and isMLFlow:
476476
cls.pyFile.write(
477477
"""\n
478-
{} = prediction""".format(metrics[0])
478+
{0} = prediction
479+
if isinstance({0}, np.ndarray):
480+
{0} = prediction.item(0)""".format(metrics[0])
479481
)
480482

481483
metricsList = ", ".join(metrics)

0 commit comments

Comments
 (0)