dpnp.logspace
- dpnp.logspace(start, stop, num=50, endpoint=True, base=10.0, dtype=None, axis=0)[source]
Return numbers spaced evenly on a log scale.
For full documentation refer to
numpy.logspace.Limitations
Parameter
axisis supported only with default value0.See also
dpnp.arangeSimilar to linspace, with the step size specified instead of the number of samples. Note that, when used with a float endpoint, the endpoint may or may not be included.
dpnp.linspaceSimilar to logspace, but with the samples uniformly distributed in linear space, instead of log space.
dpnp.geomspaceSimilar to logspace, but with endpoints specified directly.
Examples
>>> import dpnp as np >>> x = np.logspace(2.0, 3.0, num=4) >>> [i for i in x] [100.0, 215.443469, 464.15888336, 1000.0] >>> x2 = np.logspace(2.0, 3.0, num=4, endpoint=False) >>> [i for i in x2] [100.0, 177.827941, 316.22776602, 562.34132519] >>> x3 = np.logspace(2.0, 3.0, num=4, base=2.0) >>> [i for i in x3] [4.0, 5.0396842, 6.34960421, 8.0]