10,351 reputation
1945
bio website
location
age
visits member for 3 years
seen yesterday

Jan
29
comment DeleteMissing issues
how exactly do you create such a list, by entering as input or is it returned from other functions? Can you show the offending lists when that happens with InputForm? One possible reason could be something like a "Missing"[] which as output will (with the default settings) look exactly like Missing[] but of course will not be matched by DeleteMissing...
Jan
29
comment DeleteMissing issues
I have now tried several times but could not see it fail. What exactly do you do between repetitions? Kernel quit, regenerate test-list, ... Can you explain where the lists you are trying with come from?
Jan
29
comment Ctrl-V doesn't paste, it opens Find and Replace dialog instead
Just a now about the comment above: I was confused and did make the test with the wrong version (10.0.1). I just tried the correct version (10.0.2) and there could not reproduce the problem, so there is no evidence that it still exists in 10.0.2
Jan
29
comment DeleteMissing issues
strange, I just tried this with 10.0.2 on Windows 7 and it seems to work (i.e. returns {1,2,3}). What system are you on?
Jan
29
comment DeleteMissing issues
have not even used it so far, but have you seen und understood the level specification you can give as second argument? Without that it will drop elements at level 1 only, which might (or might not) be your problem...
Jan
29
comment Ctrl-V doesn't paste, it opens Find and Replace dialog instead
Do you switch between different keyboards layouts? I think this is a known issue (see e.g. here) and unfortunately seems to persist even in 10.0.2, but if one knows the source one can at least try to avoid these changes...
Jan
29
answered Mathematica style guide?
Jan
29
comment Selecting values over lists for discrete inputs in NDSolve
I think that t_?NumericQ should be the solution to your problem (it works for me). Why do you think it always returns False? It clearly does not for me. You have to do a ClearAll[Controller] before making the new definition, otherwise the old definition will be still used for non-numeric arguments. I would finally suggest to use function names starting with lower case letters for your own functions (e.g. controller instead of Controller), there is a danger of conflicts with system symbols otherwise...
Jan
29
revised Mathematica 10 issue: working with Entities slows down recurrence equations
added note about CanonicalName
Jan
28
comment Mathematica style guide?
@LeonidShifrin: and I really would love an equivalent to pythons import x as y, but I think we had that already discussed once somewhere...
Jan
28
comment How in Mathematica, would I define a function that takes arguments much like one would in an object orientated language
I still find the title and text not fitting the actual content very well. I don't see anything that would qualify "object orientated" in that function definition. It would probably best fit the term "procedural" as it has a side effect which doesn't make it really fit "functional" as well. As it changes a global variable I wouldn't consider it a felicitous construct in any programming paradigm I've ever heard of...
Jan
28
awarded  Generalist
Jan
23
comment Connect to SQLite database
+1: very good finding, I just checked that it is also available on Windows.
Jan
22
comment Using variables in function names
I don't remember what I was thinking when making that comment, but I think I wasn't really meaning to make that comment to your answer but rather to the question. What you suggest is IMHO the best alternative. The problems I described are to expected whenever one needs to make use of ToExpression and ToString and I am quite sure that I meant to put that comment somewhere else. In your approach I only see a potential performance penalty when accessing DownValues and SubValues to find all known definitions, but that might not be a problem at all if you don't have too many...
Jan
19
awarded  Yearling
Jan
17
comment How to do this in Parallel ? the correct way
@Mr.Wizard: I'm just talking about the OPs troubled code. Your code seems to be OK. I first was tricked to believe it had the same problem but it doesn't: the reason is that in your case ParallelMap sees the symbols d and s and can autodistribute them to the parallel kernels...
Jan
17
comment How to do this in Parallel ? the correct way
@Mr.Wizard: you can see what happens when you make the following additional definitions: total[data : {__?NumericQ}] := (Print[$KernelID]; data); myfun[data_, scale_] := (total[data]/scale)
Jan
17
comment How to do this in Parallel ? the correct way
to be precise the evaluation is partially done on the parallel kernels and partially on the master: the problem is that on the parallel kernels Total is called with an undefined symbol as argument (because automatic distribution can't be done as ParallelMap doesn't see symbols but only strings). With a symbol Total gives the error messages as shown and each kernel returns e.g. Total[kiwi]/skiwi, the partially evaluated result. On the master, there are definitions for kiwi and skiwi, so it now starts its own evaluation which will not give messages and return the expected results.
Jan
17
comment How to do this in Parallel ? the correct way
actually the Total::normal warning messages indicate just that (that's why I made that comment). It is of course a quite consealed message. I'm not sure whether we could expect Mathematica to do something smarter here, though...
Jan
16
comment How to programatically set options for a selected word?
behaviour is the same on Windows, at least for me: V8 and V10 do the right thing, V9 changes both words to bold...