Re: code D'ish enough? - ignore previous post with same subject

2017-02-28 Thread Jordan Wilson via Digitalmars-d-learn
On Tuesday, 28 February 2017 at 20:49:39 UTC, crimaniak wrote: On Sunday, 26 February 2017 at 21:50:38 UTC, Jordan Wilson wrote: .map!(a => a.to!double) If lambda just calls another function you can pass it directly: == .map!(to!double) Learn something new everyday, thanks :-)

Re: code D'ish enough? - ignore previous post with same subject

2017-02-28 Thread crimaniak via Digitalmars-d-learn
On Sunday, 26 February 2017 at 21:50:38 UTC, Jordan Wilson wrote: .map!(a => a.to!double) If lambda just calls another function you can pass it directly: == .map!(to!double)

Re: code D'ish enough? - ignore previous post with same subject

2017-02-27 Thread Thorstein via Digitalmars-d-learn
On Sunday, 26 February 2017 at 21:50:38 UTC, Jordan Wilson wrote: auto readNumMatCsv2 (string filePath, string ndv, string new_ndv){ double[][] p_numArray; try { auto lines = File(filePath,"r").byLine; lines.popFront; // get read of header p_numArray =

Re: code D'ish enough? - ignore previous post with same subject

2017-02-27 Thread Thorstein via Digitalmars-d-learn
I really appriciate your comments and thoughts! On Sunday, 26 February 2017 at 21:02:52 UTC, ag0aep6g wrote: On Sunday, 26 February 2017 at 19:34:33 UTC, thorstein wrote: * "no-data-value"? No-data-values in data sets are common at least in geosciences: raster images, spatial simulation

Re: code D'ish enough? - ignore previous post with same subject

2017-02-26 Thread ag0aep6g via Digitalmars-d-learn
On Sunday, 26 February 2017 at 19:34:33 UTC, thorstein wrote: // Reads CSV-like files with only numeric values in each column // new_ndv replaces ndv, which is the original no-data-value double[][]* readNumMatCsv(char[] filePath, int numHeaderLines, char[] ndv, char[] new_ndv) *

code D'ish enough? - ignore previous post with same subject

2017-02-26 Thread thorstein via Digitalmars-d-learn
Hi, sorry for posting again, but I used a keyboard combination that accidently send my post before it was done. Coming more or less from Python I just started with D. Not a real programmer, just automating things and looking for a neat compiled language. Just to learn, I wrote a function

code D'ish enough?

2017-02-26 Thread thorstein via Digitalmars-d-learn
Hi, coming more or less from Python I just started with D. Not a real programmer, just automating things and looking for a neat compiled language. Just to learn, I wrote a function to read CSV-like files (I know D has its own routine). Since I'm still a bit overwhelmed by the many complex