Questions tagged [inner]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1
vote
1answer
42 views

Unexpected behavior from Inner[]

Does anyone know why Inner[] behaves differently in the last of these three examples? Inner[f, {a, b}, {e1, e2}, List] ...
2
votes
2answers
128 views

Generalized n-fold inner product for tensors, iteration and indexing or built in functions?

I'm very new to Mathematica, and struggling to convert one of the codes I'd written in MATLAB. I am trying to program a function for a generalised inner product between two tensors, that is for ...
1
vote
1answer
155 views

How to multiply two tensor with arbitrary ranks, on one index only (like GR)?

I am writing a function which take two tensors with the same dimensions but with arbitrary ranks and multiplies them over one index, just like this example from GR: See, I couldn't use ...
0
votes
1answer
96 views

Applying corresponding elements of a list to a list of functions

I found this post which applying a function to a list of functions and arguments. I thought I could change my code with a table to something more elegant. I am not wedded to the ...
4
votes
2answers
396 views

Dot product for lists

Suppose we want to get the dot product for the following lists aa and bb, whose elements (a, ...
0
votes
2answers
69 views

Different behaviour of Map and Inner in replace rules

Why does x[{1, 2}] /. {x[l_] -> Map[func, l]} {1, 2} not behave as expected, while for example ...
1
vote
1answer
95 views

Using Inner to calculate a log likelihood

I am trying to use the function Inner to calculate the sum of log likelihoods of a custom probability distribution 'custom' applied to a vector of data 'vData'. The custom distribution changes ...
5
votes
3answers
179 views

Missing control for depth of Inner

Working on a mechanics problem, I stumbled on something peculiar: Since Inner is a generalisation of Dot, it changes its ...
7
votes
3answers
324 views

Mapping a function over the parts of a deeply nested Array

I have two tensors: tensorS = Array[Subscript[s, #1, #2, #3, #4] &, {2, 16, 16, 19}]; tensorR = Array[Subscript[r, #1, #2, #3] &, {2, 16, 19}]; ...
39
votes
5answers
2k views

How to understand the usage of Inner and Outer figuratively?

Description: In Mathematica the functions like Thread, Inner, Outer etc. are very important ...