Skip to content

Commit 720892c

Browse files
committed
fix
1 parent 3449164 commit 720892c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

python/pyspark/pandas/data_type_ops/num_ops.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@ def truediv(left: PySparkColumn, right: Any) -> PySparkColumn:
257257
).otherwise(F.lit(np.inf).__div__(left))
258258
else:
259259
return F.when(
260-
right == 0,
260+
F.lit(right == 0),
261261
F.when(left < 0, F.lit(float("-inf")))
262262
.when(left > 0, F.lit(float("inf")))
263263
.otherwise(F.lit(np.nan)),
@@ -354,7 +354,7 @@ def truediv(left: PySparkColumn, right: Any) -> PySparkColumn:
354354
)
355355
else:
356356
return F.when(
357-
right == 0,
357+
F.lit(right == 0),
358358
F.when(left < 0, F.lit(float("-inf")))
359359
.when(left > 0, F.lit(float("inf")))
360360
.otherwise(F.lit(np.nan)),

0 commit comments

Comments
 (0)