Federico
Reputation
1,589
Top tag
Next privilege 2,000 Rep.
 Mar 20 awarded Yearling Aug 10 revised The fastest way of raising indices of high rank tensor Length@Dimensions -> ArrayDepth Aug 9 answered Ways to compute inner products of tensors Aug 9 revised The fastest way of raising indices of high rank tensor optimize transposition list Aug 9 comment The fastest way of raising indices of high rank tensor @g3n1uss Notice there is a type in the first computation: it should be ...Sum[F[[i,j,k,l]]... Aug 9 answered The fastest way of raising indices of high rank tensor Aug 9 answered Adding labels to graphics Aug 9 comment Adding labels to graphics The definition of vsorted is missing. Is it the same as vectors? Aug 9 answered Why does the Derivative function not appear in the tree form? Aug 4 comment Injecting a sequence of expressions into a held expression Indeed, there is an implicit Sequence: try {#}&@Unevaluated[1, 2] // Trace. Aug 3 asked Cannot Block Plus Aug 3 comment MatrixExp of a complex matrix of size about 10000 by 10000 @user45765 If all you need to do is exponentiate and take the trace, then you can use Tr@Exp@Eigenvalues@A. In fact, the eigenvalues of $e^A$ are the exponentials of the eigenvalues of $A$. Aug 3 comment Redefining a built-in operator @Omegaman There is exactly the same difference that there is between = and :=. The ^ just stands there to signal that you want to associate the whole definition to the symbol z and not ||. Define f1[g1[t_]] ^= Expand[t^2] and f2[g2[t_]] ^:= Expand[t^2] and run f1[g1[t+1]] and f2[g2[t+1]]. You can check why it does what it does by looking at ?g1 and ?g2. Aug 2 comment How to avoid nested With[]? I suggest the variant LetL /: (assign : SetDelayed | RuleDelayed)[lhs_, rhs : HoldPattern[LetL[{__}, _]]] := Block[{With}, Attributes[With] = {HoldAll}; assign[lhs, Evaluate[rhs]]];, so that one can also use it with RuleDelayed as in Range[10] /. x_Integer :> LetL[{y = x}, -y /; y <= 5]. Mar 20 awarded Yearling Oct 13 awarded Nice Answer Sep 30 awarded Explainer Mar 20 awarded Yearling Aug 5 asked Det and MatrixRank freezes on SparseArray with nonzero default value Jul 29 awarded Necromancer