| 1484 | } |
| 1485 | |
| 1486 | PyTensor PyTensor::linspace(float start, float end, int64_t steps, |
| 1487 | const std::string& device, |
| 1488 | const std::string& dtype) { |
| 1489 | auto t = Tensor::linspace(start, end, static_cast<size_t>(steps), parse_device(device)); |
| 1490 | if (dtype != "float32") { |
| 1491 | t = t.to(parse_dtype(dtype)); |
| 1492 | } |
| 1493 | return PyTensor(std::move(t)); |
| 1494 | } |
| 1495 | |
| 1496 | PyTensor PyTensor::eye(int64_t n, const std::string& device, |
| 1497 | const std::string& dtype) { |