.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "auto_examples\knots_quantile.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_knots_quantile.py: Quantile-based Knot Generator Example ===================================== Generate knot locations based on quantiles of time points. .. GENERATED FROM PYTHON SOURCE LINES 7-24 .. rst-class:: sphx-glr-script-out .. code-block:: none Inputs: x: 0 to 1, length 100 dimension = 10 Generated knots: [-1.00000000e-05 1.11111111e-01 2.22222222e-01 3.33333333e-01 4.44444444e-01 5.45454545e-01 6.56565657e-01 7.67676768e-01 8.78787879e-01 1.00001000e+00] | .. code-block:: Python import numpy as np from spheresmooth import knots_quantile # Example input x = np.linspace(0.0, 1.0, 100) # time points dimension = 10 # number of knots print("Inputs:") print("x: 0 to 1, length 100") print("dimension =", dimension) # Generate knots knots = knots_quantile(x, dimension) print("\nGenerated knots:") print(knots) .. rst-class:: sphx-glr-timing **Total running time of the script:** (0 minutes 0.001 seconds) .. _sphx_glr_download_auto_examples_knots_quantile.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: knots_quantile.ipynb ` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: knots_quantile.py ` .. container:: sphx-glr-download sphx-glr-download-zip :download:`Download zipped: knots_quantile.zip ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_