1

I have arrays of these shapes:

q.shape #(28,40,100)
g.shape #(27,40,100)
for x in range (0,100):
    for y in range (0,40):
        qg = np.interp(100,g[:,y,x],q[:,y,x]) #how?
        print qg

Of course it can't be interpolated because g and q don't have equal shapes. How should the script be in "#how?" section, so that q remove element [0] and only reads [1] to [27]?

1
  • 1
    Put a 1 before the colon? Commented Jul 17, 2016 at 23:59

1 Answer 1

1

only reads [1] to [27]

I believe like so

q[1:,y,x]

By the way, interpolation 4000 times might be really slow... You sure you are doing the right thing?

Sign up to request clarification or add additional context in comments.

1 Comment

Haha, I'm not sure about that. As long as it results plots that I need, though. Thanks anyway

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.