58,807 reputation
6175266
bio website mathprogramming-intro.org
location St. Petersburg, Russia
age 38
visits member for 2 years, 9 months
seen 1 hour ago

Ok, an obligatory note: opinions expressed here are mine and not those of my employer.


Sep
16
revised Applying a function to a Dataset column conditional on another slot's value
Replaced with a more general code
Sep
15
answered Applying a function to a Dataset column conditional on another slot's value
Sep
15
comment Auto highlighting input cells depending on input expression (eg its Head)
@alancalvitti This is weird. My code should not affect click events, only the cells being evaluated (via SHIFT+RETURN). Anyway, thanks for the accept.
Sep
15
comment Auto highlighting input cells depending on input expression (eg its Head)
@alancalvitti Can you provide the exact code you added?
Sep
15
answered Auto highlighting input cells depending on input expression (eg its Head)
Sep
15
comment Why is it not allowed to define vectors of variables in a scoping construct?
The first argument of Block (and also Module, With) is a declaration list. Assignments in declaration list are subject to a different semantics than assignments in the body of the scoping construct. Massive assignments of the type you described are simply not allowed in scoping constructs, syntactically. A link to related discussion.
Sep
12
awarded  Enlightened
Sep
12
awarded  Nice Answer
Sep
11
comment Strange behaviour of Set and Part when given a sequence
No worries, I didn't mean that comment as a critique, just as an additional piece of information.
Sep
11
comment Strange behaviour of Set and Part when given a sequence
Set using non-standard evaluation wouldn't alone be enough to provide this behavior. The key here is that Set and SetDelayed (as well as Rule and RuleDelayed) are also SequenceHold.
Sep
11
comment Strange behaviour of Set and Part when given a sequence
Read more carefully the linked explanation. In DeleteCases, Sequence disappears in lis1 as a result of evaluation.
Sep
11
comment Strange behaviour of Set and Part when given a sequence
Have a look at this.
Sep
10
awarded  Enlightened
Sep
10
awarded  Nice Answer
Sep
9
comment Replacing matrix values
@SimonWoods Somehow I seemed to recall that Infinity might unpack, so didn't use it. Perhaps, I was wrong - I didn't test it this time.
Sep
9
answered Replacing matrix values
Sep
6
comment How to speed up band matrix-matrix multiplication?
+1. Nice to see you back!
Aug
31
awarded  Enlightened
Aug
31
awarded  Nice Answer
Aug
28
comment How to reduce the InterpolatingFunction building overhead?
@n3rd This may be due to the top-level overhead of Table, and the list in the example is pretty small. For large lists, it should be pretty fast - this is a rather basic code compiled directly to C. It may be that Matlab uses some different and highly-optimized method though.