57,625 reputation
5141334
bio website
location ND
age 31
visits member for 2 years, 7 months
seen 1 hour ago

contact details

Visit Mathematica.SE


Aug
23
comment ToExpression from commandline
@acl Yes, I think you're right.
Aug
22
comment How to generate random points in a region?
FindInstance is not a random number generator. There's no guarantee that it will give you uncorrelated random numbers with a uniform distribution. What the OP is asking for a misuse of FindInstance that is going to lead to wrong results.
Aug
22
comment How to generate random points in a region?
FindInstance is not for generating random numbers ... If you already have the disks, it's trivial to find an instance of a point which lies within them. Take the centre of any disk. It doesn't even matter that you have several disks, you can just use a single one. If you have any expectation that these numbers will be uncorrelated and uniformly distributed (within the disks) then do not use FindInstance.
Aug
21
comment How do you convert a string containing a number in C scientific notation to a Mathematica number?
Thank you Carlo, this is much appreciated!
Aug
20
comment GroupBy several keys while keeping the Dataset as a Table (List of Associations)
... <| "a" -> 1, "b" -> 2 |>. This is what Apply is good for: change the head Rule (i.e. ->) into something else. What we need here is to change it to Join. Apply[Join][...] is equivalent to Apply[Join, ...] so we can use the form Apply[Join]. I hope this clears it up a bit. Regarding this method, while it works, it's probably not efficient and I am not really happy with it. I find it too convoluted. I am hoping for something simpler ... I'm not yet experienced with Dataset, and even though my answer got accepted, I'm not too confident about it.
Aug
20
comment GroupBy several keys while keeping the Dataset as a Table (List of Associations)
@MitchellKaplan This dataset contains an association, the keys of which are also associations. Normal will convert this outer association, which has the form <| <|...|> -> <| "Sales" -> 1 |>, <|...|> -> <| "Sales" -> 2 |>, ... |> to a simple list of rules, { <|...|> -> <| "Sales" -> 1 |>, <|...|> -> <| "Sales" -> 2 |>, ... }. You can see e.g. the first element of this list using ...[Normal][1]. Now what we want to do is join the left-hand-side of -> together with its right-hand-side into a single association. Instead of having <| "a" -> 1 |> -> <| "b" -> 2 |> we want ...
Aug
19
comment Retrieve style definitions
@kguler Yes, it is a duplicate, you can vote to close. Thanks for the link!
Aug
19
comment Package function not called from button in a DockedCell expression
If you change the action to Print[DownValues[DuplicateNotebook]], it strangely prints {}.
Aug
19
comment Trial version 10 vs Version 10 Prerelease 13
I tried to write a general answer that will be useful to more people with similar problems. I hope it will solve the problem you see as well.
Aug
19
comment Trial version 10 vs Version 10 Prerelease 13
Close Mathematica, then hold down Shift-Control while starting it again. Did it fix the problem? (Reference)
Aug
18
comment OpenCL vs. CUDA with Mathematica
This is a useful read. In Mathematica, CUDALink has more useful functions that OpenCLLink. Both the CUDALink and the OpenCLLink demos work fine for me on a 2012 MacBook Pro, but I didn't go deep into the technologies. I think using them from Mathematica will be quite similar.
Aug
18
comment Does Dataset round?
Yes, that's a very useful observation, you already got my +1 for it. I meant that I'd say it's a formatting/display bug.
Aug
18
comment Does Dataset round?
If you agree that it's a bug, go ahead and add the tag.
Aug
18
comment Does Dataset round?
That's pretty misleading though, I'd still call it a bug. It is possible that it simply rounds to 4 digits, regardless of how many digits are to the left of the decimal point and how many to the right. It might make sense to round 2.34567 * 10^6 to 2.346 * 10^6, but it makes no sense to round 2345670 to 2346000 for display purposes.
Aug
18
comment Simple string pattern crashes kernel
Reproduced in all of 8.0.4, 9.0.1 & 10.0.0 on OS X 10.9.4.
Aug
18
comment Mathematica cannot find the c compiler
Then the compiler is likely not properly installed. There should be an environment variable names VS90COMNTOOLS or similar. Can you check if it exists? Evaluate GetEnvironment[] and look for it.
Aug
17
comment Mathematica cannot find the c compiler
Do not set $CCompiler. If the Microsoft compiler is installed correctly, Mathematica will auto-detect it. Re-start Mathematica (including the front end) after installing the compiler.
Aug
17
comment Unexpected Behaviour with local variables and ToExpression
@NicoDean Be careful though not to just blindly swap Module for Block. See MrWizard's links and see how Block can unexpectedly bite you when used the wrong way ...
Aug
17
comment Communication between local kernels
@Mr.Wizard I am not that experienced either, unfortunately, but I wrote something.
Aug
17
comment Communication between local kernels
@Mr.Wizard That is definitely an exciting topic, but I didn't post it because I felt it would be starting the OP down the wrong path. Building a full communication frameworks is almost certainly not what he needs even if he phrased the question this way ... I can try to write something though.