Python Forum
comparing each rows of two matrix
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
comparing each rows of two matrix
#10
The only idea I have:
Transforming the matrices into two lists, and a nested for cycle...

a_lista=a.tolist()
b_lista=b.tolist()
#"a" and "b" were my previously defined np.matrices
for i in range(4):
   for j in range(4):
      if a_lista[i]==b_lista[j]:
         print(i,j,a_lista[i])
Unfortunately, my "solution" is realy crap, because I want to use this on far bigger matrices :-(
Reply


Messages In This Thread
comparing each rows of two matrix - by PhysChem - Apr-18-2019, 06:17 AM
RE: comparing each rows of two matrix - by PhysChem - Apr-18-2019, 12:03 PM
RE: comparing each rows of two matrix - by DeaD_EyE - Apr-18-2019, 12:19 PM
RE: comparing each rows of two matrix - by PhysChem - Apr-21-2019, 03:13 PM
RE: comparing each rows of two matrix - by PhysChem - May-14-2019, 09:22 AM
RE: comparing each rows of two matrix - by PhysChem - May-16-2019, 09:47 AM

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020