RE: which() Function in SystemML

2018-07-09 Thread Baeriswyl Kuno (IT-SWE-CC1-JV6)
1/0 } R = is_na(A) Kuno -Original Message- From: Berthold Reinwald [mailto:reinw...@us.ibm.com] Sent: Samstag, 7. Juli 2018 02:12 To: dev@systemml.apache.org Subject: Re: which() Function in SystemML You may also look at example 2 "Replace NaN with mode" in our "DML Tips an

Re: which() Function in SystemML

2018-07-05 Thread Niketan Pansare
Hi Kuno, Thanks for trying out SystemML. One way to implement your logic in SystemML is as follows: X = matrix("1 4 -99 2 5 -99", rows=6, cols=1) Y = removeEmpty(target=(X > 2)*seq(1, nrow(X)), margin="rows") print("\nIndexes:\n" + toString(Y)) For handling NAs, you can replace NAs by certain