Skip to content

Commit afbec33

Browse files
committed
Add fix for np.ndarray returns in MM
1 parent 9c6a29c commit afbec33

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
@@ -489,7 +489,9 @@ def score{modelPrefix}({inputVarList}):
489489
elif not isH2OModel and isMLFlow:
490490
cls.pyFile.write(
491491
"""\n
492-
{} = prediction""".format(metrics[0])
492+
{0} = prediction
493+
if isinstance({0}, np.ndarray):
494+
{0} = prediction.item(0)""".format(metrics[0])
493495
)
494496

495497
metricsList = ", ".join(metrics)

0 commit comments

Comments
 (0)