Want to increase your earning potential in 2018? Pad your resume with app building experience. Learn how with this hands-on course.
from numpy import *
mu1 = array([[1,2,-9],[4,5,-10],[7,8,9]])
mu2 = array([[1,2,-4],[4,5,-6],[7,8,9]])
check=abs(mu1) > abs(mu2)
print check
Lambda1=mu1
Lambda1[check]=mu2[check]
Lambda2=mu2
Lambda2[check]=mu1[check]
from numpy import *
mu1 = array([[1,2,-9],[4,5,-10],[7,8,9]])
mu2 = array([[1,2,-4],[4,5,-6],[7,8,9]])
check=abs(mu1) > abs(mu2)
mu1[check]=mu2[check]
mu2[check]=mu1[check]
If you are experiencing a similar issue, please ask a related question
Join the community of 500,000 technology professionals and ask your questions.