2

They told me to post a new question to the second part of the question.

Is there some way I can replace the first 8 integers in the multidimensional array with 8 integers of array that I created for example:

    import Image
    import numpy as np

    im = Image.open("C:\Users\Jones\Pictures\1.jpg")
    pix = im.load() 
array=[0, 3, 38, 13, 7, 18, 3, 715]
    r, g, b = np.array(im).T
    print r[0:8]
1
  • I've tried to make a entire new array and add them to it the elements in array and the elements after the first 8 from multidimensional array Commented Feb 17, 2013 at 5:58

1 Answer 1

5

Try with this:

r[0, :8] = array

It looks like you can use reading the numpy docs on indexing.

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

1 Comment

wow it was that simple I cant believe I was over thinking it by that much thank you so much I'm in debted to you

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.