Questions tagged [inner]
The inner tag has no usage guidance.
11
questions
3
votes
3
answers
118
views
Alternative to Inner which allows level specification
Is it possible to restrict Inner to a certain level? According to the documentation, the expected behaviour for Inner is to ...
1
vote
1
answer
60
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
2
answers
316
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
1
answer
246
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
1
answer
119
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 ...
5
votes
2
answers
740
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
2
answers
101
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
1
answer
115
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
3
answers
184
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
3
answers
409
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}];
...
42
votes
5
answers
3k
views
How to understand the usage of Inner and Outer figuratively?
Description:
In Mathematica the functions like Thread, Inner, Outer etc. are very important ...