@halirutan do you know how to efficiently use compiled functions in packages? The obvious way is to compile each time on package load, but is it possible to distribute a compiled function as a saved file or would it be better to compile it once on the specific platform and then save it (and load it instead of compiling it the next time)?
@rm-rf Currently, I'm using about 8 compiled functions in one of my packages. They are recompiled when the package is loaded and I wouldn't know whether it is worth the effort to save precompiled versions.
I have a model to fit which is made of numerical functions and so it can give a value for any numerical value of the arguments, but creates an error when called with symbols. NonlinearModelFit chooses numerical values for parameters and puts them in, but for the variables it keeps symbols when ca...
When I write a module such as this: `myExp[x0_, p0_] := Module[{x = x0, p = p0}, exp = Sum[x^n/n!, {n, 0, p}] // N; {exp, x, p} ]` to calculate `Exp[x]`. Is this already an approximation like an Interpolating function?
Hummm, I just commented on an old question and got -1 rep? Confused
@drN Hello
Not sure what you mean
The first element of the resulting list will be the exact value of the sum converted to machine precision, because of N. The other two elements will be exact.
Interesting. I did an absolute timing: `SeriesCoefficient[E^x, {x, 0, 10}] // N // AbsoluteTiming` which resulted in `{0.000545,2.75573*10^-7}`.
And another absolute time `SeriesCoefficient[N[E]^x, {x, 0, 10}] // AbsoluteTiming` which resulted in `{0.000151,2.75573*10^-7}`. Clearly the latter is *faster* since I suppose it levies a machine precision *tax* on calculations.
@Rojo Thanks a lot. I must now go and vaccum my house. Oh Saturday bloody staurday!
Hi, I remember once having seen a Manipulate that helps building other Manipulates (for adding controls), does someone know the link to this ? This is independent of your current discussion. Thanks
@Rojo My understanding has always been that if MemberQ[sel, patt] returns True, then it returns elements in list corresponding to positions in sel where MatchQ[#, patt]& /@ sel is True.
Except[0] is definitely a pattern that is respected by MemberQ and MatchQ, and Pick fails in that respect, given the above interpretation.
@SjoerdC.deVries I suppose if one has nested lists and want to pick out the highest level lists with a property, it could be used. Something like _?(FreeQ[#, x]&)...?
@SjoerdC.deVries @Rojo @MichaelE2 Please consider a Q&A for this... this was an interesting discussion about Pick's behaviour which (IMO) is un/poorly documented
@Rojo Sometimes I will get to them after a couple of days, but they won't get upvoted then, especially if there's already an accepted answer, even when the method of solution is distinct.
It's not the rep but the feeling that someone appreciated the answer.
@Rojo Yes, he even encouraged me to through my answers and post some suggestions for the fund. First, it takes time, but mostly I'm too shy. I'd rather someone else look at the answer and say whether it's worthwhile.
@Rojo I did look through some. The best had received enough votes. Most of the good ones had received some... I'm better at the math Qs than the programming ones.
Humm, I got an open question that only the Futz can answer, and he said he would "when he has time" (that was a year ago). He probably won't be motivated by rep
@mr.wizard, hellooooo
Could you put some small bounty on this question and consider it payment for the scheduledTasks thing?
Hello! Does anyone know if it is possible in LibraryLink to get pointers to the actual arrays underlying MTensors so that we can manipulate their data directly rather than having to use the WolframLibraryData->MTensor_* functions? It seems otherwise one has the choice to either copy the tensors (memory cost) or to put all these function calls inside one's inner loops directly (performance cost)?
Or have I misunderstood and actually the WolframLibraryData->MTensor_get*Data functions provide this pointer directly rather than a pointer to a copy of the data?