MCPcopy Create free account
hub / github.com/ml-explore/mlx / outer

Function outer

mlx/ops.cpp:5448–5451  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5446}
5447
5448array outer(const array& a, const array& b, StreamOrDevice s /* = {} */) {
5449 return multiply(
5450 reshape(a, {static_cast<int>(a.size()), 1}, s), flatten(b, s), s);
5451}
5452
5453array inner(const array& a, const array& b, StreamOrDevice s /* = {} */) {
5454 if (a.ndim() == 0 || b.ndim() == 0) {

Callers 5

test_leaksMethod · 0.85
test_leaksMethod · 0.85
test_leaksMethod · 0.85
test_leaksMethod · 0.85
ops_tests.cppFile · 0.85

Calls 4

multiplyFunction · 0.85
flattenFunction · 0.85
reshapeFunction · 0.70
sizeMethod · 0.45

Tested by 4

test_leaksMethod · 0.68
test_leaksMethod · 0.68
test_leaksMethod · 0.68
test_leaksMethod · 0.68