I am trying to do this function on two 2D node arrays: Step 1: Search I tried to do this: But there is no dice any ideas? Thanks in advance. Based on your comments, I have the best understanding: Where we use Normal Broadcasting, its maximum number is in line or perhaps obvious: np. Argmax (b, axis = 1) index step 2: find
b [index] & gt; A [coordinator] Step 3: Return value in 2D Boolean array.
np.where ((b & gt; a) & amp;; np.argmax (b, axis = 1). Repeat ((3, -1)), right, wrong)
Output = (NPMX (B, Axis = 1) [..., none] == B) & amp; (B & G; A)
b :
np.max (b, axis = 1) [..., none] == b
NPMX (B, Axis = 1) [..., NP.Newxis] == B
No comments:
Post a Comment