Skip to content

Commit

Permalink
Expand test coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
ClaudiaComito committed Aug 23, 2021
1 parent f1cadcb commit be8979d
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion heat/core/tests/test_manipulations.py
Original file line number Diff line number Diff line change
Expand Up @@ -3276,14 +3276,22 @@ def test_tile(self):
self.assertTrue((np_tiled == ht_tiled.numpy()).all())
self.assertTrue(ht_tiled.dtype is x.dtype)

# test scalar x
# test scalar DNDarray x
x = ht.array(9.0)
reps = (2, 1)
ht_tiled = ht.tile(x, reps)
np_tiled = np.tile(x.numpy(), reps)
self.assertTrue((np_tiled == ht_tiled.numpy()).all())
self.assertTrue(ht_tiled.dtype is x.dtype)

# test scalar x
x = 10
reps = (2, 1)
ht_tiled = ht.tile(x, reps)
np_tiled = np.tile(x, reps)
self.assertTrue((np_tiled == ht_tiled.numpy()).all())
self.assertTrue(ht_tiled.dtype is ht.int64)

# test distributed tile along split axis
# len(reps) > x.ndim
split = 1
Expand Down

0 comments on commit be8979d

Please sign in to comment.