10,726 reputation
2046
bio website
location
age
visits member for 3 years, 2 months
seen 16 hours ago

Jan
16
comment Kernel sometimes quit after second evaluation of ListVectorPlot
@Mr.Wizard: crashes with 10.0.0, 10.0.1 and 10.0.2 on Windows but works with 8.0.4 and 9.0.1 on Windows for me. For 10.0.1 there are additional error messages...
Jan
10
comment Change system options in package
While it might possible to create something which would do that packagewise I don't think it would be wise to do so. What I'd recommend is to just write a wrapper for the above code fragment and then define your functions using that wrapper like: f[x_]:=ignoreUnderflow[Exp[-x]] where ignoreUnderflow would be said wrapper. That would be straightforward to implement, easy to read/understand and save you almost completely from any redundancy without making your functions rely on some hidden obscure mechanisms...
Dec
30
comment Trying to Figure Out how to work with datasets & Classify[] and Predict[]
Or, making use of the new v10 functionalities (which will work surprisingly well for this example): beerdata = SemanticImport["https://s3.amazonaws.com/mirlitus/datos/beer.csv"] and then: data = ({"income", "age", "gender", "education"} -> "beer") /. Normal[beerdata]
Dec
24
comment Importing a large Excel file
I'm not sure whether it will be quicker in any case as there is also quite some overhead in the COM approach, especially I think copies of the data will be made which might lead to memory problems. I absolutely aggree that of the many possible ways to get the data every one has its strong and weak sides, it certainly depends very much on the use case which approach will turn out to be the best...
Dec
24
revised Importing a large Excel file
added note about DatabaseLink and ODBC excel driver
Dec
24
comment Importing a large Excel file
have you tried to directly get the data from excel through COM, probably in chunks to save memory? I'm just wondering whether that'd be faster (slower) or more (less) memory efficient and if so by how much. It would also avoid the intermediate file altogether for which writing and reading performance might depend a lot on the hardware (e.g. HD vs. SSD)...
Dec
20
comment How to execute code on FrontEnd quit?
this idea is by far not a solution but at best a workaround: you could use the "WindowClose" event and check whether the closing notebook is the last notebook of the current the session. One problem I can see with this is that this might execute the code even if the user cancels the quit. There might be other problems as well (I haven't actually tried it)...
Dec
16
comment ParametricNDSolve problem
OK. I understand, but I think it would make sense to point out that what is returned can actually be used in a straightforward way. I didn't understand the OPs question like that, but the question isn't exactly clear :-).
Dec
15
comment ParametricNDSolve problem
wouldn't it be much easier to just do solution = ParametricNDSolveValue[{y'[t] == a y[t], y[0] == 1}, y, {t, 0, 10}, {a}]? Then solution[0.5] gets the solution as an interpolating function for e.g. a=0.5 and solution[0.5][5] evaluates this for t=5...
Dec
9
comment Mathematica 10 issue: working with Entities slows down recurrence equations
Please see my answer for some examples about how to get rid of Quantity and Entity in your data without changing global options...
Dec
9
answered Mathematica 10 issue: working with Entities slows down recurrence equations
Dec
9
comment Exporting files while running .m file from command line
I think there was a similar question not long ago where someone tried to import data during initialization: the problem is that some functionality is not yet available during initialization of the kernel, and Import and Export for many formats are among them. This is why using math < tst.m as suggested will usually work. There are even better ways to run mathematica scripts from the command line for newer versions, search the docs (or this site) for mathematica and script to learn more...
Dec
9
comment Mathematica 10 issue: working with Entities slows down recurrence equations
I think the problem is most probably not with solving the recurrence equations as such but the fact that CityData and CountryData do return Entity and Quantity objects since version 10. While it is possible to use these in many calculations they of course are slowing down things remarkably. So I would suggest to get rid of those using EntityValue and QuantityValue. I think there is also a global option to change the behavior of the data functions to what it was in version 9, to be found on this site...
Dec
9
comment Any Progress with a Python MathLink?
AFAIK there are no plans by WRI to provide a python link as an integral part of Mathematica like MathLink, JLink or NETLink. But a google search with Mathematica and python returns several existing projects/possibilities doing what you ask for, some even dicussed on this site. Have you tried these or are they not working for you?
Dec
8
comment How do you make a 3D city population graphic?
@Guillochon: have you tested that code with version 10? It looks like you need to replace Quantities for it to work in version 10, e.g. add a line dat =dat /. q_Quantity :> QuantityMagnitude[q] ...
Dec
4
comment JLink does not preserve the input cell number
OK I see, that is of course somewhat disturbing. I have not realized that one can see this not only as an example but also as a building block. It looks like the Kernel/Mathlink behaviour has changed from version 8 to 9 so that now the numbering is wrong, the numbering for the example works correct for older versions (which it presumably was written for). I have no idea how to solve that, you might want to report it to WRI. What is it that you are trying to build?
Dec
4
comment JLink does not preserve the input cell number
Actually I would guess that it is probably not even documented what the In prompt should behave like when the Kernel is called via JLink. Can you explain why that is a problem? Assuming it is not recommended to rely on a specific ordering of In statements when programmatically using the Kernel it would seem irrelevant what these are for a JLink program, wouldn't it?
Dec
4
answered Plotting data from specific column
Dec
3
answered How to remove hours, minutes, seconds from list
Nov
28
comment How to put constraints on NDSolve[] solution
I absolutely aggree with the first sentence of user18792: you should reformulate the problem. If you just ad hoc enforce a constraint with a programming trick the solution will violate physical laws (energy conservation, momentum conservation,...) in an arbitrary and basically uncontrolled way...