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.fromstring.html below:

jax.numpy.fromstring — JAX documentation

jax.numpy.fromstring#
jax.numpy.fromstring(string, dtype=<class 'float'>, count=-1, *, sep)[source]#

Convert a string of text into 1-D JAX array.

JAX implementation of numpy.fromstring().

Parameters:
  • string (str) – input string containing the data.

  • dtype (DTypeLike) – optional. Desired data type for the array. Default is float.

  • count (int) – optional integer specifying the number of items to read from the string. If -1 (default), all items are read.

  • sep (str) – the string used to separate values in the input string.

Returns:

A 1-D JAX array containing the parsed data from the input string.

Return type:

Array

Examples

>>> jnp.fromstring("1 2 3", dtype=int, sep=" ")
Array([1, 2, 3], dtype=int32)
>>> jnp.fromstring("0.1, 0.2, 0.3", dtype=float, count=2, sep=",")
Array([0.1, 0.2], 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