Tensor.full of bool has dtypes.bool (#2823)

This commit is contained in:
chenyu
2023-12-18 10:51:17 -05:00
committed by GitHub
parent 220abcd8ff
commit 8aab19ce3d
2 changed files with 4 additions and 2 deletions

View File

@@ -238,6 +238,7 @@ class TestTypeSpec(unittest.TestCase):
assert Tensor.zeros([2,3]).dtype == Tensor.default_type
assert Tensor.full([2,3], 3.3).dtype == Tensor.default_type
assert Tensor.full([2,3], 3).dtype == dtypes.int
assert Tensor.full([2,3], True).dtype == dtypes.bool
def test_reduce_0d_default(self):
assert Tensor.ones([2,3,0]).sum(2).dtype == Tensor.default_type