About 10,700,000 results
Open links in new tab
  1. python - How to define a two-dimensional array? - Stack Overflow

    Jul 12, 2011 · I want to define a two-dimensional array without an initialized length like this: Matrix = [][] But this gives an error: IndexError: list index out of range

  2. What does the "at" (@) symbol do in Python? - Stack Overflow

    An @ symbol at the beginning of a line is used for class and function decorators: PEP 318: Decorators Python Decorators - Python Wiki The most common Python decorators are: @property …

  3. How do I create a "matrix" with a python list? - Stack Overflow

    Aug 12, 2022 · How do I create a "matrix" with a python list? [duplicate] Asked 3 years, 4 months ago Modified 3 years, 4 months ago Viewed 17k times

  4. python - Find the linearly independent rows of a matrix - Stack Overflow

    How do I identify the linearly independent rows of a matrix? For instance, [[0 1 0 0] [0 0 1 0] [0 1 1 0] [1 0 0 1]] The 4th row is independent.

  5. python - defining the i,j th entry of a matrix in loop - Stack Overflow

    Dec 17, 2017 · A[i][j] = newvalue This works for the various "matrices" that are built in to Python, such as the list or array. Note that this means that each row in the matrix is a item in the overall list, so the …

  6. python - numpy matrix vector multiplication - Stack Overflow

    Following normal matrix multiplication rules, an (n x 1) vector is expected, but I simply cannot find any information about how this is done in Python's Numpy module.

  7. matrix - How to represent matrices in python - Stack Overflow

    Jun 27, 2010 · How can I represent matrices in python?((1,2,3,4), (5,6,7,8), (9,0,1,2)) Using tuples instead of lists makes it marginally harder to change the data structure in unwanted ways. If you are …

  8. python matrix transpose and zip - Stack Overflow

    Nov 10, 2013 · python matrix transpose and zip [duplicate] Asked 13 years, 8 months ago Modified 1 year, 1 month ago Viewed 33k times

  9. python - changing the values of the diagonal of a matrix in numpy ...

    May 23, 2017 · how can I change the values of the diagonal of a matrix in numpy? I checked Numpy modify ndarray diagonal, but the function there is not implemented in numpy v 1.3.0. lets say we …

  10. python - Pretty print 2D list? - Stack Overflow

    Is there a simple, built-in way to print a 2D Python list as a 2D matrix? So this: