mirror of
https://github.com/ml-explore/mlx.git
synced 2025-08-21 02:46:40 +08:00
remove monostate
This commit is contained in:
parent
bd1a11bef7
commit
3dc638bffb
@ -3198,12 +3198,9 @@ void init_ops(py::module_& m) {
|
||||
"tensordot",
|
||||
[](const array& a,
|
||||
const array& b,
|
||||
const std::variant<std::monostate, int, std::vector<std::vector<int>>>&
|
||||
dims,
|
||||
const std::variant<int, std::vector<std::vector<int>>>& dims,
|
||||
StreamOrDevice s) {
|
||||
if (std::holds_alternative<std::monostate>(dims)) {
|
||||
return tensordot(a, b, 2, s);
|
||||
} else if (auto pv = std::get_if<int>(&dims); pv) {
|
||||
if (auto pv = std::get_if<int>(&dims); pv) {
|
||||
return tensordot(a, b, *pv, s);
|
||||
} else {
|
||||
return tensordot(
|
||||
|
Loading…
Reference in New Issue
Block a user