systemml-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From arijit chakraborty <>
Subject Re: SystemML query
Date Mon, 17 Apr 2017 15:40:51 GMT


I've an issue regarding finding and removing the duplicate in a column/ row of a matrix. I'm
tried this method:

duplicate_matrix = matrix("1 2 3 3 3 4 5 6", rows = 8, cols = 1)

dup_ind = matrix(1,rows = nrow(duplicate_matrix),cols = 1)
a = nrow(dup_ind)
b = nrow(duplicate_matrix)
                                                #Clumsy Unique. Can we check with the systemml
for(i in 2:nrow(duplicate_matrix)){
    if(as.scalar(duplicate_matrix[i,]) == as.scalar(duplicate_matrix[i-1,]) ){
    dup_ind[i,] = 0

My question is, is there any better way of doing it? In systemML, we don't have method to
find/remove/ count duplicate values.

Thank you!

From: Niketan Pansare <>
Sent: Friday, April 14, 2017 9:14 PM
To: arijit chakraborty
Cc: Matthias Boehm1; Berthold Reinwald
Subject: Re: SystemML query

Thanks Arijit. I appreciate your feedback. I will convey your concerns to other committers
and urge them to be active on stackoverflow too. If you have already posted questions on stackoverflow,
please send me the links and I will do my best to answer them :)

On Apr 14, 2017, at 6:50 AM, arijit chakraborty <<>>

Thanks a lot Niketan! I didn’t expect you to reply my question. Actually I was not sure
if I can post question in that forum. And hardly people reply on systemML in stackoverflow.

But from now on I’ll surely post my questions there. I’ve few more questions.

Thanks a lot again!


Sent from Mail<> for Windows 10

From: Niketan Pansare<>
Sent: Thursday, April 13, 2017 11:01 PM
To: arijit chakraborty<>
Subject: Re: SystemML query

Hi Arijit,

I am happy to help, however I would recommend to post question (along with answer) on our
mailing list<>
as your question may help others as well :)

X = matrix(1, rows = 1, cols = 100)
J = matrix("10 20 25 26 28 31 50 67 79", rows=1, cols=9)
J = t(J) # Make J a column vector
I = matrix(1, rows=nrow(J), cols=1)
V = matrix(10, rows=nrow(J), cols=1)
output = table(I, J, V)


Niketan Pansare
IBM Almaden Research Center
E-mail: npansar At<>

<graycol.gif>arijit chakraborty ---04/13/2017 09:20:38 AM---Hi Niketan, Hope you are
keeping well!

From: arijit chakraborty <<>>
To: Niketan Pansare/Almaden/IBM@IBMUS
Date: 04/13/2017 09:20 AM
Subject: SystemML query

Hi Niketan,

Hope you are keeping well!

I got stuck in a systemML coding problem and don't know where to approach. So mailing you.
I know this is not fair, and will not repeat in future.

My question is the following:

I've a matrix of 1 row and 100 columns, matrix(1, rows = 1, cols = 100). I've another column
matrix of form matrix("10 20 25 26 28 31 50 67 79", rows = 1, cols = 9). I want to add some
value say 10, to 100 column matrix using the values of second matrix position indicator. Rest
of the columns' values remain the same

How to do it here?

Thanks a lot! Regards,

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message