Reputation
93,057
Next tag badge:
893/400 score
79/80 answers
Badges
6 247 525
Impact
~1.2m people reached

19m
comment Why is `FindCycle` crashing for this graph?
I think you should report it to Wolfram even if not everyone can reproduce the crash. Memory corruption bugs don't always result in a crash, but that does not mean that the bug is not there.
36m
comment Why is `FindCycle` crashing for this graph?
Doesn't crash with v10.4.1 on OS X. Anyway, if you see a crash, that's a bug. If you can reproduce it, report to to support: wolfram.com/support
2h
answered Is it possible to get the (x, y) position of nodes in a `Graph`?
1d
revised How to convert Image3D object into Graphics3D object and vice versa?
added 224 characters in body
1d
revised How to convert Image3D object into Graphics3D object and vice versa?
edited title
2d
answered How to convert Image3D object into Graphics3D object and vice versa?
2d
comment How to perform this nth derivative operation in MMA?
Derivative[n][f][s]. But it's not clear at all to me what you are trying to do.
Apr
26
comment Map vs listable
g[{1, {2, 3}, 4, f[x]}] is a good example to include too. This cannot be done with Map at all, not even by mapping at level -1.
Apr
26
comment How to generate higher dimensional convex hull?
@MauricioLobos Well, it just gives you the facets, not anything Mathematica-specific. BoundaryMeshRegion and MeshRegion only support 1D, 2D and 3D regions... I'm not sure how to handle such a thing as a proper region. Maybe instead of that you could convert the constraint to a set of inequalities? Sorry, I don't know enough about what works well for this type of optimization problem ...
Apr
26
comment How to generate higher dimensional convex hull?
Besides Qhull, CGAL also does this. You could consider writing an up-to-date, easy to use LibraryLink interface to one of them ;-)
Apr
26
answered How to generate higher dimensional convex hull?
Apr
26
comment How to use `Except[]` inside of `Pick[]`
Related: mathematica.stackexchange.com/questions/59272/…
Apr
26
comment How to understand the different output of two UnsetShared?
@luyuwuli Yes. A shared variable is always evaluated on the master kernel and is always set on the master kernel. Normally you use DistributeDefinitions (this actually happens automatically with most parallelization functions except ParallelEvaluate), which creates independent copies of symbols on the subkernels.
Apr
26
comment How to understand the different output of two UnsetShared?
@luyuwuli Generally: try to avoid SetSharedVariable and SetSharedFunction because they might slow down your program so much that it will perform worse than the non-parallel version. Yet there are certain cases when these are still useful, e.g. if the subkernels do a very slow piece of computation that might take a few seconds to complete, and at the end of this they report their progress to the master kernel. In most cases that I deal with the performance hit is too much though.
Apr
26
comment How to understand the different output of two UnsetShared?
@luyuwuli Ideally you would design your algorithm in a way that subkernels do not need to communicate with each other at all. They are assigned tasks by the master kernel, they complete the tasks and return the result. But sometimes this is not possible. Some algorithms require communication between the parallel threads. In all cases, this brings a performance hit. In Mathematica it brings a big performance hit. But if the communication is minimized, it might still be worth doing it and parallelization may still provide a speedup.
Apr
26
answered How to understand the different output of two UnsetShared?
Apr
26
comment How to understand the different output of two UnsetShared?
This behaviour is new in 10.4 (and I can confirm it with 10.4.1). In 10.3.1 I get only z printed after the first UnsetShared. I smell a bug. Can you contact support and report it to them? If they respond, can you let us know their response?
Apr
25
revised Verifying the outputs of 'Solve'
added 275 characters in body
Apr
25
comment Mathematica Precisions vs Doubles in C/C++
@romanovzky I don't know much about linear algebra software, but I think that Armadillo's results may be influenced by the underlying BLAS/LAPACK implementations. I'm on OS X using it's built-in Accelerate framework (the default for Armadillo). On Linux Armadillo would be using some other BLAS depending on its configuration.
Apr
25
answered Verifying the outputs of 'Solve'