Skip to content

Commit

Permalink
Update basics.py
Browse files Browse the repository at this point in the history
  • Loading branch information
steven-johnson committed Sep 16, 2024
1 parent 6ab39d3 commit 7b8308f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions python_bindings/test/correctness/basics.py
Original file line number Diff line number Diff line change
Expand Up @@ -451,14 +451,14 @@ def test_implicit_convert_int64():


def test_explicit_expr_ctors():
assert (hl.Expr(np.bool_(0))).type() == hl.Bool()
assert (hl.Expr(np.bool_(0))).type() == hl.Bool(), (hl.Expr(np.bool_(0))).type()
assert (hl.Expr(np.int32(0))).type() == hl.Int(32), (hl.Expr(np.int32(0))).type()
assert (hl.Expr(np.int64(0x7fffffff+1))).type() == hl.Int(64), (hl.Expr(np.int64(0x7fffffff+1))).type()
assert (hl.Expr(np.float32(0))).type() == hl.Float(32), (hl.Expr(np.float32(0))).type()
# Note that this is deliberate: we have aggressively downscaled scalar
# float64 values from Python into float32, and we aren't going to change
# that now.
assert (hl.Expr(np.float64(0))).type() == hl.Float(32)
assert (hl.Expr(np.float64(0))).type() == hl.Float(32), (hl.Expr(np.float64(0))).type()


if __name__ == "__main__":
Expand Down

0 comments on commit 7b8308f

Please sign in to comment.