A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://docs.jax.dev/en/latest/_autosummary/jax.numpy.geomspace.html below:

jax.numpy.geomspace — JAX documentation

jax.numpy.geomspace#
jax.numpy.geomspace(start, stop, num=50, endpoint=True, dtype=None, axis=0)[source]#

Generate geometrically-spaced values.

JAX implementation of numpy.geomspace().

Parameters:
  • start (Array | ndarray | bool | number | bool | int | float | complex) – scalar or array. Specifies the starting values.

  • stop (Array | ndarray | bool | number | bool | int | float | complex) – scalar or array. Specifies the stop values.

  • num (int) – int, optional, default=50. Number of values to generate.

  • endpoint (bool) – bool, optional, default=True. If True, then include the stop value in the result. If False, then exclude the stop value.

  • dtype (str | type[Any] | dtype | SupportsDType | None) – optional. Specifies the dtype of the output.

  • axis (int) – int, optional, default=0. Axis along which to generate the geomspace.

Returns:

An array containing the geometrically-spaced values.

Return type:

Array

Examples

List 5 geometrically-spaced values between 1 and 16:

>>> with jnp.printoptions(precision=3, suppress=True):
...   jnp.geomspace(1, 16, 5)
Array([ 1.,  2.,  4.,  8., 16.], dtype=float32)

List 4 geomtrically-spaced values between 1 and 16, with endpoint=False:

>>> with jnp.printoptions(precision=3, suppress=True):
...   jnp.geomspace(1, 16, 4, endpoint=False)
Array([1., 2., 4., 8.], dtype=float32)

Multi-dimensional geomspace:

>>> start = jnp.array([1, 1000])
>>> stop = jnp.array([27, 1])
>>> with jnp.printoptions(precision=3, suppress=True):
...   jnp.geomspace(start, stop, 4)
Array([[   1., 1000.],
       [   3.,  100.],
       [   9.,   10.],
       [  27.,    1.]], dtype=float32)

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4