Questions tagged [inner]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
3 votes
3 answers

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 ...
arutar's user avatar
  • 41
1 vote
1 answer

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] ...
J Tyson's user avatar
  • 113
2 votes
2 answers

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 ...
konovification's user avatar
1 vote
1 answer

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 ...
Milad P.'s user avatar
  • 197
0 votes
1 answer

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 ...
user1543042's user avatar
5 votes
2 answers

Dot product for lists

Suppose we want to get the dot product for the following lists aa and bb, whose elements (a, ...
renphysics's user avatar
  • 1,550
0 votes
2 answers

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 ...
Severin's user avatar
  • 53
1 vote
1 answer

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 ...
ben18785's user avatar
  • 3,167
5 votes
3 answers

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 ...
tjger's user avatar
  • 51
7 votes
3 answers

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}]; ...
bst's user avatar
  • 127
42 votes
5 answers

How to understand the usage of Inner and Outer figuratively?

Description: In Mathematica the functions like Thread, Inner, Outer etc. are very important ...
xyz's user avatar
  • 595