Bottom Page

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
 Code problems
#1
Hi, I'm having problems so I hope someone can help. I have two matrices (2d numpy arrays) and I need to make third one by overlapping first two matrices so that result is tuples. So, if first one is M=np.array([[1,2],[5,4]]) and second one N=np.array([[2,6],[9,7]]), third should be (1,2),(2,6) in first row, and (5,9),(4,7) in second row. How can I do that?
Quote
#2
I believe that flatten to 1D, pair columnwise and reshape could deliver desired result.
I'm not 'in'-sane. Indeed, I am so far 'out' of sane that you appear a tiny blip on the distant coast of sanity. Bucky Katt, Get Fuzzy

Da Bishop: There's a dead bishop on the landing. I don't know who keeps bringing them in here. ....but society is to blame.
Quote
#3
I have this (array([1, 2]), array([2, 6]), array([5, 9]), array([4, 7]). How can I compare elements of each pair, eg. 1 with 2, 2 with 6...?
Quote
#4
Do you want to compare for equality or which is bigger/smaller?
I'm not 'in'-sane. Indeed, I am so far 'out' of sane that you appear a tiny blip on the distant coast of sanity. Bucky Katt, Get Fuzzy

Da Bishop: There's a dead bishop on the landing. I don't know who keeps bringing them in here. ....but society is to blame.
Quote

Top Page

Forum Jump:


Users browsing this thread: 1 Guest(s)