Reputation
943
Top tag
Next privilege 1,000 Rep.
See votes, expandable usercard
Badges
4 16
Newest
 Yearling
Impact
~15k people reached

Jun
24
comment Parallel and non-Parallel functions return different results?
I see, thanks! +1
Jun
24
comment Parallel and non-Parallel functions return different results?
A naive question about this: I've faced a warning saying that parallelization was not possible and that the evaluation would proceed sequentially sometimes. Could the issue that you raise (of the internal state between evaluations having to be maintained) be detected by that sort of warnings, or does it bypass it?
Jun
24
comment Parallel and non-Parallel functions return different results?
@rcollyer nope. He is running this on his laptop and possibly on a desktop too.
Jun
24
comment Parallel and non-Parallel functions return different results?
@rcollyer he sees this behavior in v10 and 10.1. When we (me and my friend) were discussing this issue, we also mentioned that the ordering should not be kept, but that the reassembled result likely would re-order everything back.
Jun
24
asked Parallel and non-Parallel functions return different results?
May
31
awarded  Yearling
Apr
25
comment How to use an expression for the argument to a function
Sorry, misunderstood your question. But maybe you could post these functions as working examples in the original post?
Apr
25
comment How to use an expression for the argument to a function
wouldn't f[list_]:=Total@list solve it? (ahem, this is what @sektor meant with Apply)
Apr
22
comment Nesting Parallel processes
On a completely different script, I am also facing the error that @Jagra posted. Interestingly, when I use the exact same code with Map instead of ParallelMap it takes ages to finish the calculations (some 12 hours splitted among 4 computers for Map vs <1hour in one of those computers using ParallelMap). @Szabolcs -- will there be any reason why using Off[ParallelMap::subpar] would still allow the warnings to show up? It's happening here
Apr
21
comment Block works when directly used but not when used in a function
Usually, depending on the question, I like to wait one day to see if other people answer differently or make suggestions before accepting an answer. After that, I usually accept it as long as it really answers my question :) To choose it as an answer just click the checkmark near the arrows on the left side of the answer. It should become green, meaning it was accepted. And welcome @nein! The chat (chat.stackexchange.com/rooms/2234/wolfram-mathematica) is also good and is full of people who are happy to help in simple questions
Apr
21
answered Block works when directly used but not when used in a function
Apr
21
comment Block works when directly used but not when used in a function
It seems that doing SetAttributes[deltaf, HoldAll]; solves the problem, thanks to @IstvánZachar (chat.stackexchange.com/transcript/message/21216245#21216245)
Apr
21
comment Block works when directly used but not when used in a function
would this be anything of what you want? (yes, I know it's a different approach :) ) Clear@ble; ble[j_, k_] := Block[{a, myf}, myf[i_, x_] := (1 - x)*Sum[a[i, k]^2, {k, 1, 3}]; Sum[D[myf[A, x], a[i, k]], {i, {A, B}}, {k, {1, 2, 3}}] ] ble[A, x]
Apr
21
comment Block works when directly used but not when used in a function
Actually, I think you want the exact opposite of what I was suggesting. Notice that when you do deltaf[f1[A,x]] you are evaluating D[f, a[i, k]] (=14 (1 - x)) AND THEN using this result to compute the Sum. This is why the derivative then gives 0, because you are evaluating the derivatives of 14(1-x) with respect to a[i,k].
Apr
21
comment Block works when directly used but not when used in a function
Did you try deltaf[Evaluate[f1[A, x]]]?
Feb
11
awarded  Popular Question
Nov
13
accepted Is there a way to show some “weighted” residuals after LinearModelFit?
Nov
13
comment Deleting empty cells and selecting cells matching a pattern
eh, it works, also on those with multiple paragraphs and stuff!
Nov
13
comment Deleting empty cells and selecting cells matching a pattern
You are right, I was only thinking on what I see in a notebook. Indeed, some cells often have "\n" and I don't see those, so maybe the search could be on white space?
Nov
13
asked Deleting empty cells and selecting cells matching a pattern