.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "auto_examples/plot_compare_jax_scipy.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_plot_compare_jax_scipy.py: Compare `JAX` and `Scipy` ========================= This example compares the `JAX` and `Scipy` implementations of the interpolation backend. .. GENERATED FROM PYTHON SOURCE LINES 9-18 .. code-block:: Python import jax.numpy as jnp import numpy as np from time import time import matplotlib.pyplot as plt from astropy import units as u from GridPolator import GridSpectra .. GENERATED FROM PYTHON SOURCE LINES 19-21 First let's get the spectra ----------------------------- .. GENERATED FROM PYTHON SOURCE LINES 21-47 .. code-block:: Python w1 = 5 * u.um w2 = 12 * u.um resolving_power = 100 teffs = [2800,2900,3000,3100,3200,3300] impl_bin = 'rust' g_jax = GridSpectra.from_vspec( w1=w1, w2=w2, resolving_power=resolving_power, teffs=teffs, impl_bin=impl_bin, impl_interp='jax', fail_on_missing=False ) g_scipy = GridSpectra.from_vspec( w1=w1, w2=w2, resolving_power=resolving_power, teffs=teffs, impl_bin=impl_bin, impl_interp='scipy', fail_on_missing=False ) .. rst-class:: sphx-glr-script-out .. code-block:: none Loading Spectra: 0%| | 0/6 [00:00` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: plot_compare_jax_scipy.py ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_