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 = lines.map!(

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 o

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

2017-02-26 Thread Jordan Wilson via Digitalmars-d-learn
On Sunday, 26 February 2017 at 19:34:33 UTC, thorstein wrote: 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

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) * "no-data-value

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 t