.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "auto_examples\normalize_lower.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_normalize_lower.py: Normalize Vector Example ======================== Normalize a vector by dividing by its L2 norm. .. GENERATED FROM PYTHON SOURCE LINES 7-22 .. rst-class:: sphx-glr-script-out .. code-block:: none Input vector: v = [1 2 3 4 5 6] Normalized vector normalize_lower(v): [0.10482848 0.20965697 0.31448545 0.41931393 0.52414242 0.6289709 ] | .. code-block:: Python import numpy as np from spheresmooth import normalize_lower # Example vector v = np.array([1, 2, 3, 4, 5, 6]) print("Input vector:") print("v =", v) # Normalize v_norm = normalize_lower(v) print("\nNormalized vector normalize_lower(v):") print(v_norm) .. rst-class:: sphx-glr-timing **Total running time of the script:** (0 minutes 0.001 seconds) .. _sphx_glr_download_auto_examples_normalize_lower.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: normalize_lower.ipynb ` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: normalize_lower.py ` .. container:: sphx-glr-download sphx-glr-download-zip :download:`Download zipped: normalize_lower.zip ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_