About 51 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. 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, 5 months ago Modified 3 years, 5 months ago Viewed 17k times

  3. 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 …

  4. matrix - How to make matrices in Python? - Stack Overflow

    Sep 30, 2013 · I've googled it and searched StackOverflow and YouTube.. I just can't get matrices in Python to click in my head. Can someone please help me? I'm just trying to create a basic 5x5 box …

  5. 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 …

  6. Matrix Multiplication in pure Python? - Stack Overflow

    Nov 30, 2017 · 7 Here's some short and simple code for matrix/vector routines in pure Python that I wrote many years ago:

  7. numpy - What's the difference between @ and * with python matrix ...

    Sep 3, 2020 · What's the difference between @ and * with python matrix multiplication? Asked 5 years, 5 months ago Modified 1 year, 2 months ago Viewed 23k times

  8. matrix - Matrices in Python - Stack Overflow

    Nov 6, 2013 · >>> numpy.matrix([[1,2,3],[4,"5",6]])[1,1] '5' >>> numpy.matrix([[1,2,3],[4,"5",6]])[1,2] '6' Now, the Python list type can instead accept mixed types. You can have a list containing an integer …

  9. What is the '@=' symbol for in Python? - Stack Overflow

    Dec 9, 2014 · 131 @= and @ are new operators introduced in Python 3.5 performing matrix multiplication. They are meant to clarify the confusion which existed so far with the operator * which …

  10. python - How to get element-wise matrix multiplication (Hadamard ...

    Oct 14, 2016 · a * b If you're on Python 3.5+, you don't even lose the ability to perform matrix multiplication with an operator, because @ does matrix multiplication now: