The tile op does not accept None as reps (#1117)

This commit is contained in:
Cheng 2024-05-14 21:25:25 +08:00 committed by GitHub
parent 2c7e9b5158
commit cbd5445ea7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -3824,7 +3824,9 @@ void init_ops(nb::module_& m) {
)pbdoc");
m.def(
"tile",
[](const array& a, const IntOrVec& reps, StreamOrDevice s) {
[](const array& a,
const std::variant<int, std::vector<int>>& reps,
StreamOrDevice s) {
if (auto pv = std::get_if<int>(&reps); pv) {
return tile(a, {*pv}, s);
} else {