Python Forum
I can't see all elements of matrix
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
I can't see all elements of matrix
#3
Hello
I created my code as I want and now I just want to change my matrix.
As a result of my code, I have this matrix:

[Image: 642.png]

And here I want to write each column as a rows and after that I want to add them together. As a result I should see this image:

[Image: 648.png]

Here is my code(I just add the related part):
………….. ##I didn't paste here because we have just definition of list
for triplet in itertools.product([0, 1], repeat=6):
    arr = np.array([])
    for i in range(8):
        for l in range(8):
            if l[l] == n[i]:
                arr = np.append(arr,[1])
                
            else:
                arr = np.append(arr,[0])
                
    print(arr)
Reply


Messages In This Thread
I can't see all elements of matrix - by quest - Nov-05-2020, 11:05 AM
Numpy Matrix Elements: Change Rows to Columns - by quest - Nov-05-2020, 03:47 PM
RE: I can't see all elements of matrix - by Larz60+ - Nov-06-2020, 06:41 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Check if two matrix are equal and of not add the matrix to the list quest 3 910 Jul-10-2023, 02:41 AM
Last Post: deanhystad
  ValueError: Length mismatch: Expected axis has 8 elements, new values have 1 elements ilknurg 1 5,320 May-17-2022, 11:38 AM
Last Post: Larz60+
  How to multiply a matrix with herself, until the zero matrix results peanutbutterandjelly 3 3,436 May-03-2021, 06:30 AM
Last Post: Gribouillis
  Sorting Elements via parameters pointing to those elements. rpalmer 3 2,676 Feb-10-2021, 04:53 PM
Last Post: rpalmer
  matrix from matrix python numpy array shei7141 1 3,757 Jan-16-2017, 06:10 PM
Last Post: micseydel

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020