GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing www.geeksforgeeks.org — numpy.dot() in Python - GeeksforGeeks numpy.dot() in PythonLast Updated : 19 Dec, 2025 numpy.dot() is used to compute the dot product of two arrays.
Example: This example shows how numpy.dot() calculates the dot product of two 1D arrays.
Output 23 Explanation: np.dot(a, b) -> 2*4 + 3*5 = 8 + 15 = 23. Syntax
Parameters:
ExamplesExample 1: This example demonstrates the dot product of two complex numbers using numpy.dot().
Output (-7+22j) Explanation: np.dot(a, b) multiplies using complex arithmetic -> 2*(4+5j) + 3j*(4+5j) -> -7 + 22j. Example 2: This example shows matrix multiplication using numpy.dot() on two 2D arrays.
Output [[22 12] [40 32]] Explanation: np.dot(a, b) performs matrix multiplication
Example 3: This example uses numpy.dot() with a 2D array and a 1D array to produce a vector.
Output [21 8 11] Explanation: Each row of a is dotted with vector b
Comment Explore |
| You are visitor 01402503 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |