MathGroup Archive 2003

[Date Index] [Thread Index] [Author Index]

Search the Archive

Confused by levels in Outer


This makes sense:
Outer[f, {a}, {{a, b}, {b, c}}, 1, 1]
    {{f[a, {a, b}], f[a, {b, c}]}}

This makes sense:
Outer[f, {a}, {{a, b}, {b, c}}, 1, 2]
    {{{f[a, a], f[a, b]}, {f[a, b], f[a, c]}}}

This makes sense:
Outer[f, {a}, {{{a, b}, {b, c}}}, 1, 1]
    {{f[a, {{a, b}, {b, c}}]}}

But this doesn't make sense:
Outer[f, {a}, {{{a, b}, {b, c}}}, 1, 2]
    {{{{f[a, a], f[a, b]}, {f[a, b], f[a, c]}}}}

The last one gives the result I'd expect from Outer[f, {a}, {{{a, b}, {b,
c}}}, 1, 3].
It seems like it should give {{{f[a, {a, b}], f[a, {b, c}]}}}.
Why doesn't it treat {a, b} and {b, c} as atomic elements?

Thanks,
Ken



  • Prev by Date: Antw: pdf-export
  • Next by Date: InterpolatingFunctionAnatomy
  • Previous by thread: Re: Antw: pdf-export
  • Next by thread: Re: Confused by levels in Outer