.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "auto_examples\dot.py" .. LINE NUMBERS ARE GIVEN BELOW. .. only:: html .. note:: :class: sphx-glr-download-link-note :ref:`Go to the end ` to download the full example code. .. rst-class:: sphx-glr-example-title .. _sphx_glr_auto_examples_dot.py: Dot Example =================== Compute the dot product of two vectors. .. GENERATED FROM PYTHON SOURCE LINES 7-24 .. rst-class:: sphx-glr-script-out .. code-block:: none Input vectors: u = [1. 2. 3.] v = [4. 5. 6.] Dot product dot(u, v): 32.0 | .. code-block:: Python import numpy as np from spheresmooth import dot # Example vectors u = np.array([1.0, 2.0, 3.0]) v = np.array([4.0, 5.0, 6.0]) print("Input vectors:") print("u =", u) print("v =", v) # Compute dot product: dot(u, v) uv_dot = dot(u, v) print("\nDot product dot(u, v):") print(uv_dot) .. rst-class:: sphx-glr-timing **Total running time of the script:** (0 minutes 0.001 seconds) .. _sphx_glr_download_auto_examples_dot.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: dot.ipynb ` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: dot.py ` .. container:: sphx-glr-download sphx-glr-download-zip :download:`Download zipped: dot.zip ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_