(self)
| 235 | assert rand.device == empty.device |
| 236 | |
| 237 | def test_rand_like_zero_shape(self): |
| 238 | empty = Tensor.empty(0, 20) |
| 239 | rand = Tensor.rand_like(empty) |
| 240 | assert rand.shape == empty.shape |
| 241 | assert rand.dtype == empty.dtype |
| 242 | assert rand.device == empty.device |
| 243 | |
| 244 | def test_rand_like_more_dims(self): |
| 245 | empty = Tensor.empty((1, 2, 3, 4, 5, 6)) |