{"id":3788,"date":"2026-01-24T10:16:59","date_gmt":"2026-01-24T10:16:59","guid":{"rendered":"https:\/\/www.askpython.com\/?p=3788"},"modified":"2026-01-25T14:56:01","modified_gmt":"2026-01-25T14:56:01","slug":"numpy-linspace-python","status":"publish","type":"post","link":"https:\/\/www.askpython.com\/python-modules\/numpy\/numpy-linspace-python","title":{"rendered":"NumPy linspace(): Create Arrays Fast"},"content":{"rendered":"<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: python; title: ; notranslate\" title=\"\">\nimport numpy as np\n\n# Create 5 evenly spaced values between 0 and 10\nresult = np.linspace(0, 10, 5)\nprint(result)\n# Output: &#x5B; 0.   2.5  5.   7.5 10. ]\n\n<\/pre><\/div>\n\n\n<p>The np.linspace function generates evenly spaced numbers across a defined interval. You specify where to start, where to stop, and how many values you want. NumPy calculates the spacing automatically.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Basic syntax for np.linspace<\/h2>\n\n\n\n<p>The function accepts several parameters that control array generation:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: python; title: ; notranslate\" title=\"\">\nnumpy.linspace(start, stop, num=50, endpoint=True, retstep=False, dtype=None, axis=0)\n\n<\/pre><\/div>\n\n\n<p>The start parameter defines your first value. The stop parameter sets your last value (or the boundary if endpoint is False). The num parameter determines how many values to generate between these boundaries.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: python; title: ; notranslate\" title=\"\">\nimport numpy as np\n\n# Generate 10 values from 0 to 100\nvalues = np.linspace(0, 100, 10)\nprint(values)\n# Output: &#x5B;  0.  11.11111111  22.22222222  33.33333333  44.44444444  \n#           55.55555556  66.66666667  77.77777778  88.88888889 100.]\n\n<\/pre><\/div>\n\n\n<p>NumPy divides the interval into equal segments. With 10 values spanning 0 to 100, each step measures approximately 11.11 units. The function includes both endpoints by default, which affects the spacing calculation.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Understanding the endpoint parameter in np.linspace<\/h2>\n\n\n\n<p>The endpoint parameter changes how np.linspace calculates spacing. When endpoint equals True (the default), the stop value appears in your output array. When endpoint equals False, NumPy excludes the stop value and adjusts the spacing.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: python; title: ; notranslate\" title=\"\">\nimport numpy as np\n\n# With endpoint included\nincluded = np.linspace(0, 10, 5, endpoint=True)\nprint(&quot;Endpoint included:&quot;, included)\n# Output: &#x5B; 0.   2.5  5.   7.5 10. ]\n\n# Without endpoint\nexcluded = np.linspace(0, 10, 5, endpoint=False)\nprint(&quot;Endpoint excluded:&quot;, excluded)\n# Output: &#x5B;0. 2. 4. 6. 8.]\n\n<\/pre><\/div>\n\n\n<p>Notice how the spacing changes. With the endpoint included, you get values at 0, 2.5, 5, 7.5, and 10. Without the endpoint, the spacing becomes 2.0 instead of 2.5, and the array stops at 8.<\/p>\n\n\n\n<p>This behavior matters when you need precise control over array boundaries. For periodic functions or when creating bins for histograms, excluding the endpoint often produces cleaner results.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: python; title: ; notranslate\" title=\"\">\nimport numpy as np\n\n# Creating bins for a histogram\nbins = np.linspace(0, 100, 11, endpoint=False)\nprint(bins)\n# Output: &#x5B; 0. 10. 20. 30. 40. 50. 60. 70. 80. 90.]\n\n<\/pre><\/div>\n\n\n<h2 class=\"wp-block-heading\">Getting step size with the retstep parameter<\/h2>\n\n\n\n<p>The retstep parameter returns both the array and the spacing between values. This becomes useful when you need to know the exact step size for subsequent calculations.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: python; title: ; notranslate\" title=\"\">\nimport numpy as np\n\n# Get array and step size\narray, step = np.linspace(0, 50, 11, retstep=True)\nprint(&quot;Array:&quot;, array)\nprint(&quot;Step size:&quot;, step)\n# Output:\n# Array: &#x5B; 0.  5. 10. 15. 20. 25. 30. 35. 40. 45. 50.]\n# Step size: 5.0\n\n<\/pre><\/div>\n\n\n<p>The function returns a tuple when retstep is True. You can unpack this tuple directly into two variables, as shown above. The step value represents the distance between consecutive elements.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: python; title: ; notranslate\" title=\"\">\nimport numpy as np\n\n# Using step size for calculations\nvalues, spacing = np.linspace(1, 100, 20, retstep=True)\nnext_value = values&#x5B;-1] + spacing\nprint(f&quot;Next value in sequence: {next_value}&quot;)\n# Output: Next value in sequence: 105.21052631578948\n\n<\/pre><\/div>\n\n\n<h2 class=\"wp-block-heading\">Creating arrays for plotting with np.linspace<\/h2>\n\n\n\n<p>Plotting functions requires x-axis values with sufficient resolution to show smooth curves. The np.linspace method excels at generating these coordinate arrays.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: python; title: ; notranslate\" title=\"\">\nimport numpy as np\nimport matplotlib.pyplot as plt\n\n# Generate x values for a sine wave\nx = np.linspace(0, 2 * np.pi, 100)\ny = np.sin(x)\n\nplt.plot(x, y)\nplt.title(&#039;Sine wave using np.linspace&#039;)\nplt.xlabel(&#039;x&#039;)\nplt.ylabel(&#039;sin(x)&#039;)\nplt.grid(True)\nplt.show()\n\n<\/pre><\/div>\n\n\n<p>The code above creates 100 evenly spaced points between 0 and 2\u03c0. More points produce smoother curves but require more computation. Fewer points run faster but create jagged lines.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: python; title: ; notranslate\" title=\"\">\nimport numpy as np\nimport matplotlib.pyplot as plt\n\n# Compare different resolutions\nx_low = np.linspace(0, 2 * np.pi, 10)\nx_high = np.linspace(0, 2 * np.pi, 200)\n\nplt.plot(x_low, np.sin(x_low), &#039;o-&#039;, label=&#039;10 points&#039;)\nplt.plot(x_high, np.sin(x_high), label=&#039;200 points&#039;)\nplt.legend()\nplt.show()\n\n<\/pre><\/div>\n\n\n<p>You can also create custom x-axis scales for specialized plots. If your data represents temperature sensors along a conveyor belt, np.linspace generates the position values.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: python; title: ; notranslate\" title=\"\">\nimport numpy as np\n\n# Position of 15 sensors from 0 to 100 meters\nsensor_positions = np.linspace(0, 100, 15)\ntemperatures = np.random.uniform(20, 30, 15)  # Random temps\n\nfor pos, temp in zip(sensor_positions, temperatures):\n    print(f&quot;Position {pos:.2f}m: {temp:.2f}\u00b0C&quot;)\n\n<\/pre><\/div>\n\n\n<h2 class=\"wp-block-heading\">Evaluating mathematical functions using np.linspace<\/h2>\n\n\n\n<p>Mathematical functions operate on continuous domains, but computers work with discrete values. The np.linspace function bridges this gap by sampling functions at regular intervals.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: python; title: ; notranslate\" title=\"\">\nimport numpy as np\n\n# Evaluate a quadratic function\nx = np.linspace(-5, 5, 50)\ny = x**2 - 3*x + 2\n\nprint(f&quot;Minimum value: {np.min(y):.4f}&quot;)\nprint(f&quot;Maximum value: {np.max(y):.4f}&quot;)\n# Output varies based on sampling, but captures the function&#039;s behavior\n\n<\/pre><\/div>\n\n\n<p>You can combine multiple functions for complex calculations. NumPy&#8217;s vectorized operations work directly on arrays generated by np.linspace.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: python; title: ; notranslate\" title=\"\">\nimport numpy as np\n\n# Calculate compound interest over time\nprincipal = 1000\nrate = 0.05\nyears = np.linspace(0, 30, 31)  # 0 to 30 years\n\nbalance = principal * np.exp(rate * years)\n\nprint(&quot;Year 0:&quot;, balance&#x5B;0])\nprint(&quot;Year 10:&quot;, balance&#x5B;10])\nprint(&quot;Year 30:&quot;, balance&#x5B;30])\n\n<\/pre><\/div>\n\n\n<p>The exponential function np.exp applies to every element in the years array. This produces a balance array showing compound growth at each time step. No loops required.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Building multidimensional arrays with np.linspace<\/h2>\n\n\n\n<p>You can transform one-dimensional linspace arrays into higher dimensions using reshape or by creating coordinate grids.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: python; title: ; notranslate\" title=\"\">\nimport numpy as np\n\n# Create a 2D grid\nx = np.linspace(0, 1, 25).reshape(5, 5)\nprint(x)\n\n<\/pre><\/div>\n\n\n<p>For genuine 2D coordinate systems, combine np.linspace with np.meshgrid. This creates coordinate matrices for evaluating functions of two variables.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: python; title: ; notranslate\" title=\"\">\nimport numpy as np\n\n# Create 2D coordinate system\nx = np.linspace(-2, 2, 50)\ny = np.linspace(-2, 2, 50)\nX, Y = np.meshgrid(x, y)\n\n# Evaluate 2D Gaussian\nZ = np.exp(-(X**2 + Y**2))\n\nprint(f&quot;Grid shape: {Z.shape}&quot;)\nprint(f&quot;Maximum value: {np.max(Z):.4f}&quot;)\n\n<\/pre><\/div>\n\n\n<p>The meshgrid function transforms two 1D arrays into two 2D matrices. Each matrix contains coordinates for evaluating functions across the grid. This technique powers 3D surface plots and contour maps.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: python; title: ; notranslate\" title=\"\">\nimport numpy as np\nimport matplotlib.pyplot as plt\n\n# Create saddle surface\nx = np.linspace(-3, 3, 100)\ny = np.linspace(-3, 3, 100)\nX, Y = np.meshgrid(x, y)\nZ = X**2 - Y**2\n\nplt.contourf(X, Y, Z, levels=20, cmap=&#039;viridis&#039;)\nplt.colorbar()\nplt.title(&#039;Saddle surface: z = x\u00b2 - y\u00b2&#039;)\nplt.show()\n\n<\/pre><\/div>\n\n\n<h2 class=\"wp-block-heading\">Controlling data types with the dtype parameter<\/h2>\n\n\n\n<p>The dtype parameter specifies the data type for array elements. NumPy infers float64 by default when you provide floating-point start or stop values.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: python; title: ; notranslate\" title=\"\">\nimport numpy as np\n\n# Default float type\nfloats = np.linspace(0, 10, 5)\nprint(f&quot;Type: {floats.dtype}&quot;)\n# Output: Type: float64\n\n# Force integer type\nintegers = np.linspace(0, 10, 5, dtype=int)\nprint(f&quot;Type: {integers.dtype}&quot;)\nprint(integers)\n# Output: Type: int64\n# &#x5B; 0  2  5  7 10]\n\n<\/pre><\/div>\n\n\n<p>Integer conversion truncates decimal values toward negative infinity. This can create unexpected results when you expect rounding.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: python; title: ; notranslate\" title=\"\">\nimport numpy as np\n\n# Compare conversion methods\nfloat_array = np.linspace(0, 10, 11)\nint_direct = np.linspace(0, 10, 11, dtype=int)\nint_rounded = np.round(float_array).astype(int)\n\nprint(&quot;Float array:&quot;, float_array)\nprint(&quot;Direct int:&quot;, int_direct)\nprint(&quot;Rounded int:&quot;, int_rounded)\n\n<\/pre><\/div>\n\n\n<p>You can specify any NumPy dtype: float32, complex128, or custom structured types. Lower precision types save memory but reduce accuracy.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: python; title: ; notranslate\" title=\"\">\nimport numpy as np\n\n# Memory comparison\nfloat64_array = np.linspace(0, 100, 1000, dtype=np.float64)\nfloat32_array = np.linspace(0, 100, 1000, dtype=np.float32)\n\nprint(f&quot;Float64 memory: {float64_array.nbytes} bytes&quot;)\nprint(f&quot;Float32 memory: {float32_array.nbytes} bytes&quot;)\n# Float64 uses 8000 bytes, Float32 uses 4000 bytes\n\n<\/pre><\/div>\n\n\n<h2 class=\"wp-block-heading\">Comparing np.linspace vs np.arange<\/h2>\n\n\n\n<p>NumPy provides np.arange for creating sequences with fixed step sizes. Understanding when to use each function saves debugging time.<\/p>\n\n\n\n<p>The np.linspace function prioritizes endpoint precision. You specify exactly where to start and stop, plus how many values you need. NumPy calculates the step size.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: python; title: ; notranslate\" title=\"\">\nimport numpy as np\n\n# Using linspace\nlin = np.linspace(0, 1, 11)\nprint(&quot;Linspace:&quot;, lin)\n# Output: &#x5B;0.  0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1. ]\n\n<\/pre><\/div>\n\n\n<p>The np.arange function prioritizes step size. You specify the increment between values, and NumPy generates values until reaching (but not including) the stop value.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: python; title: ; notranslate\" title=\"\">\nimport numpy as np\n\n# Using arange\narr = np.arange(0, 1.1, 0.1)\nprint(&quot;Arange:&quot;, arr)\n# Output: &#x5B;0.  0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1. ]\n\n<\/pre><\/div>\n\n\n<p>These look similar but behave differently with non-integer steps. Floating-point arithmetic in np.arange can produce unexpected results.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: python; title: ; notranslate\" title=\"\">\nimport numpy as np\n\n# Arange with floating-point step\nproblematic = np.arange(0, 1, 0.3)\nprint(&quot;Arange with 0.3 step:&quot;, problematic)\nprint(&quot;Length:&quot;, len(problematic))\n# Output might have 3 or 4 elements depending on rounding errors\n\n<\/pre><\/div>\n\n\n<p>Use np.linspace when you need exact start and stop values, especially for plotting or mathematical analysis. Use np.arange when the step size matters more than the endpoint, particularly with integer sequences.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Practical use cases for np.linspace in data science<\/h2>\n\n\n\n<p>Time series analysis often requires evenly spaced timestamps. The np.linspace function creates these temporal arrays for resampling or interpolation.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: python; title: ; notranslate\" title=\"\">\nimport numpy as np\nimport pandas as pd\n\n# Create hourly timestamps for a day\nhours = np.linspace(0, 24, 25)\ntimestamps = pd.date_range(&#039;2024-01-01&#039;, periods=25, freq=&#039;h&#039;)\n\n# Simulate temperature readings\ntemperatures = 20 + 5 * np.sin(2 * np.pi * hours \/ 24)\n\ndf = pd.DataFrame({\n    &#039;timestamp&#039;: timestamps,\n    &#039;temperature&#039;: temperatures\n})\nprint(df.head())\n\n<\/pre><\/div>\n\n\n<p>Machine learning models sometimes need synthetic data for testing. You can generate evenly distributed features using np.linspace.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: python; title: ; notranslate\" title=\"\">\nimport numpy as np\n\n# Generate synthetic linear regression data\nX = np.linspace(0, 10, 100).reshape(-1, 1)\nnoise = np.random.normal(0, 1, 100).reshape(-1, 1)\ny = 3 * X + 5 + noise\n\nprint(f&quot;Feature shape: {X.shape}&quot;)\nprint(f&quot;Target shape: {y.shape}&quot;)\n\n<\/pre><\/div>\n\n\n<p>Signal processing applications use np.linspace to create time arrays for sampling continuous signals at specific frequencies.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: python; title: ; notranslate\" title=\"\">\nimport numpy as np\n\n# Sample rate of 44.1 kHz (CD quality)\nsample_rate = 44100\nduration = 1.0  # seconds\n\n# Create time array\nt = np.linspace(0, duration, int(sample_rate * duration), endpoint=False)\n\n# Generate 440 Hz tone (musical note A)\nfrequency = 440\nsignal = np.sin(2 * np.pi * frequency * t)\n\nprint(f&quot;Signal length: {len(signal)} samples&quot;)\nprint(f&quot;Signal duration: {duration} seconds&quot;)\n\n<\/pre><\/div>\n\n\n<p>The endpoint=False parameter prevents creating a sample at exactly 1.0 seconds, which would duplicate the start of the next period in continuous playback.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Common patterns and edge cases with np.linspace<\/h2>\n\n\n\n<p>Single-value arrays serve as edge cases. When num equals 1, np.linspace returns the start value.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: python; title: ; notranslate\" title=\"\">\nimport numpy as np\n\nsingle = np.linspace(5, 10, 1)\nprint(single)\n# Output: &#x5B;5.]\n\n<\/pre><\/div>\n\n\n<p>Empty arrays result from num=0. This creates a valid NumPy array with zero elements.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: python; title: ; notranslate\" title=\"\">\nimport numpy as np\n\nempty = np.linspace(0, 10, 0)\nprint(empty)\nprint(f&quot;Length: {len(empty)}&quot;)\n# Output: &#x5B;]\n# Length: 0\n\n<\/pre><\/div>\n\n\n<p>Negative ranges work identically to positive ranges. The function simply creates evenly spaced values in reverse order.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: python; title: ; notranslate\" title=\"\">\nimport numpy as np\n\nnegative = np.linspace(10, 0, 11)\nprint(negative)\n# Output: &#x5B;10.  9.  8.  7.  6.  5.  4.  3.  2.  1.  0.]\n\n<\/pre><\/div>\n\n\n<p>Complex number ranges follow the same logic, spacing values in the complex plane.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: python; title: ; notranslate\" title=\"\">\nimport numpy as np\n\ncomplex_range = np.linspace(0+0j, 1+1j, 5)\nprint(complex_range)\n# Output: &#x5B;0.  +0.j   0.25+0.25j 0.5 +0.5j  0.75+0.75j 1.  +1.j  ]\n\n<\/pre><\/div>\n\n\n<p>The np.linspace function handles these edge cases consistently. The same spacing algorithm applies regardless of value types or ranges.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Performance considerations for np.linspace arrays<\/h2>\n\n\n\n<p>Large arrays consume memory proportionally to their size. A million-element float64 array requires about 8 megabytes.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: python; title: ; notranslate\" title=\"\">\nimport numpy as np\n\n# Create large array\nlarge = np.linspace(0, 1, 1_000_000)\nprint(f&quot;Memory usage: {large.nbytes \/ 1024 \/ 1024:.2f} MB&quot;)\n# Output: Memory usage: 7.63 MB\n\n<\/pre><\/div>\n\n\n<p>Generation speed scales linearly with array size. Creating 10 million elements takes roughly 10 times longer than 1 million elements.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: python; title: ; notranslate\" title=\"\">\nimport numpy as np\nimport time\n\nsizes = &#x5B;1_000, 10_000, 100_000, 1_000_000]\n\nfor size in sizes:\n    start = time.time()\n    arr = np.linspace(0, 1, size)\n    elapsed = time.time() - start\n    print(f&quot;Size {size}: {elapsed*1000:.4f} ms&quot;)\n\n<\/pre><\/div>\n\n\n<p>For extremely large arrays, consider generating values on demand rather than storing everything in memory. Generator expressions or chunked processing save resources.<\/p>\n\n\n\n<p>The np.linspace method remains one of NumPy&#8217;s most versatile functions. It creates evenly spaced arrays for plotting, mathematical analysis, signal processing, and scientific computing. The function&#8217;s simplicity conceals its power. You specify boundaries and count, and NumPy handles the rest. Master this function and you unlock precise numerical control across countless applications.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The np.linspace function generates evenly spaced numbers across a defined interval. You specify where to start, where to stop, and how many values you want. NumPy calculates the spacing automatically. Basic syntax for np.linspace The function accepts several parameters that control array generation: The start parameter defines your first value. The stop parameter sets your [&hellip;]<\/p>\n","protected":false},"author":6,"featured_media":65731,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[93],"tags":[],"class_list":["post-3788","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-numpy"],"blocksy_meta":[],"_links":{"self":[{"href":"https:\/\/www.askpython.com\/wp-json\/wp\/v2\/posts\/3788","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.askpython.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.askpython.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.askpython.com\/wp-json\/wp\/v2\/users\/6"}],"replies":[{"embeddable":true,"href":"https:\/\/www.askpython.com\/wp-json\/wp\/v2\/comments?post=3788"}],"version-history":[{"count":0,"href":"https:\/\/www.askpython.com\/wp-json\/wp\/v2\/posts\/3788\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.askpython.com\/wp-json\/wp\/v2\/media\/65731"}],"wp:attachment":[{"href":"https:\/\/www.askpython.com\/wp-json\/wp\/v2\/media?parent=3788"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.askpython.com\/wp-json\/wp\/v2\/categories?post=3788"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.askpython.com\/wp-json\/wp\/v2\/tags?post=3788"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}