🌐
NumPy
numpy.org › doc › 2.1 › reference › generated › numpy.logspace.html
numpy.logspace — NumPy v2.1 Manual
If base is a scalar, logspace is equivalent to the code · >>> y = np.linspace(start, stop, num=num, endpoint=endpoint) ... >>> power(base, y).astype(dtype) ... Examples · >>> import numpy as np >>> np.logspace(2.0, 3.0, num=4) array([ 100. , 215.443469 , 464.15888336, 1000.
🌐
GeeksforGeeks
geeksforgeeks.org › python › numpy-logspace-python
numpy.logspace() in Python - GeeksforGeeks
February 14, 2026 - The numpy.logspace() function is used to generate numbers that are evenly spaced on a logarithmic scale.
🌐
NumPy
numpy.org › devdocs › reference › generated › numpy.logspace.html
numpy.logspace — NumPy v2.5.dev0 Manual
If base is a scalar, logspace is equivalent to the code · >>> y = np.linspace(start, stop, num=num, endpoint=endpoint) ... >>> power(base, y).astype(dtype) ... Examples · Try it in your browser! >>> import numpy as np >>> np.logspace(2.0, 3.0, num=4) array([ 100.
🌐
TutorialsPoint
tutorialspoint.com › return-evenly-spaced-numbers-over-a-log-scale-in-numpy
Return evenly spaced numbers over a log scale in Numpy
February 10, 2022 - To return evenly spaced numbers on a log scale, use the numpy.logspace() method in Python Numpy. The 1st parameter is the "start" i.e. the start of the sequence. The 2nd parameter is the "end" i.e.
🌐
NumPy
numpy.org › doc › 2.3 › reference › generated › numpy.logspace.html
numpy.logspace — NumPy v2.3 Manual
If base is a scalar, logspace is equivalent to the code · >>> y = np.linspace(start, stop, num=num, endpoint=endpoint) ... >>> power(base, y).astype(dtype) ... Examples · Try it in your browser! >>> import numpy as np >>> np.logspace(2.0, 3.0, num=4) array([ 100.
🌐
Programiz
programiz.com › python-programming › numpy › methods › logspace
NumPy logspace()
The logspace() method creates an array with evenly spaced numbers on a log scale.
🌐
w3resource
w3resource.com › numpy › array-creation › logspace.php
NumPy: numpy.logspace() function - w3resource
March 21, 2023 - The numpy.logspace() function returns an array with numbers that are evenly spaced on a logarithmic scale.
🌐
Python Pool
pythonpool.com › home › blog › how to start using numpy logspace() method in python
How to Start Using Numpy logspace() Method in Python - Python Pool
January 3, 2024 - In this example, we will import the numpy library to use the logspace() function and use the start value, stop value, base, and num parameters to return the spaced log scale evenly. Let’s see the output with these parameters: #import numpy library import numpy as np Output = np.logspace(2.0, 3.0, num=5, base = 30) print("output array : ",Output)
Find elsewhere
🌐
Reddit
reddit.com › r/learnpython › help creating a np.array using np.log()
r/learnpython on Reddit: Help creating a np.array using np.log()
February 16, 2023 -

For a class assignment, I have to create 2 arrays using numpy. X generates fine, but Y gives me the error " invalid value encountered in log Y = np.log(X) ". How do I get a second array named Y that is the natural log of the values in the array X?

X = np.array(np.random.normal(0, 0.4, 25000))
Y = np.array(np.log(X))
🌐
Tutorial Gateway
tutorialgateway.org › python-numpy-logspace
Python NumPy logspace
December 20, 2024 - The Python numpy logspace function generate evenly spaced numbers on a log scale within a range. The syntax of the numpy logspace is
🌐
Vultr Docs
docs.vultr.com › python › third-party › numpy › logspace
Python Numpy logspace() - Generate Logarithmic Spaced Array | Vultr Docs
November 14, 2024 - Use the logspace() function to create an array. python Copy · import numpy as np log_array = np.logspace(1, 10, num=10, base=10) print(log_array) Explain Code · This example creates an array of 10 values logarithmically spaced between 10^1 ...
🌐
Medium
medium.com › @amit25173 › numpy-logspace-with-examples-87aed47b4728
numpy.logspace with Examples. If you think you need to spend $2,000… | by Amit Yadav | Medium
February 9, 2025 - numpy.logspace generates values logarithmically spaced, meaning the intervals between numbers grow (or shrink) exponentially. Perfect for exponential growth, logarithmic plots, or scenarios where scale matters. numpy.linspace creates values ...
🌐
TutorialsPoint
tutorialspoint.com › numpy › numpy_logspace_function.htm
Numpy logspace() Function
The Numpy logspace() function is used to generate an array of numbers spaced evenly on a logarithmic scale. It is useful for creating ranges that increase exponentially rather than linearly, which is common in many scientific and engineering
🌐
TutorialsPoint
tutorialspoint.com › return-evenly-spaced-numbers-on-a-log-scale-and-set-the-number-of-samples-to-generate-in-numpy
Return evenly spaced numbers on a log scale and set the number of samples to generate in Numpy
February 16, 2022 - To return evenly spaced numbers on a log scale, use the numpy.logspace() method in Python Numpy. The 1st parameter is the "start" i.e. the start of the sequence. The 2nd parameter is the " end" i.e. the end of the sequence. The 3rd parameter is the num i.e. the number of samples to generate.
🌐
Spark Code Hub
sparkcodehub.com › numpy › basics › logspace-guide
Mastering NumPy logspace(): Creating Logarithmic Sequences with Precision
np.logspace() is a specialized and powerful method for generating arrays of numbers spaced evenly on a logarithmic scale.
🌐
NumPy
numpy.org › devdocs › reference › generated › numpy.linspace.html
numpy.linspace — NumPy v2.5.dev0 Manual
logspace · Similar to geomspace, but with the end points specified as logarithms. How to create arrays with regularly-spaced values · Examples · Try it in your browser! >>> import numpy as np >>> np.linspace(2.0, 3.0, num=5) array([2. , 2.25, 2.5 , 2.75, 3.
🌐
SciPy
docs.scipy.org › doc › numpy-1.3.x › reference › generated › numpy.logspace.html
numpy.logspace — NumPy v1.3 Manual (DRAFT)
March 20, 2009 - Logspace is equivalent to the code · >>> y = linspace(start, stop, num=num, endpoint=endpoint) >>> power(base, y) Examples · >>> np.logspace(2.0, 3.0, num=4) array([ 100. , 215.443469 , 464.15888336, 1000. ]) >>> np.logspace(2.0, 3.0, num=4, endpoint=False) array([ 100.
🌐
JAX Documentation
docs.jax.dev › en › latest › _autosummary › jax.numpy.logspace.html
jax.numpy.logspace — JAX documentation
>>> start = jnp.array([0, 5]) >>> stop = jnp.array([5, 0]) >>> base = jnp.array([2, 3]) >>> with jnp.printoptions(precision=3, suppress=True): ... jnp.logspace(start, stop, 5, base=base) Array([[ 1. , 243. ], [ 2.378, 61.547], [ 5.657, 15.588], [ 13.454, 3.948], [ 32.
🌐
Educative
educative.io › answers › what-is-the-logspace-function-from-numpy-in-python
What is the logspace() function from NumPy in Python?
The logspace() function returns number samples equally spaced on a log scale. import numpy as np · # creating the array · myarray = np.logspace(1, 10, num=10, endpoint = True, base = 2, dtype = float, axis = 0) print(myarray) Run · Line 1: ...