Movatterモバイル変換


[0]ホーム

URL:


Skip to main content
Ctrl+K
JAX  documentation - Home

jax.numpy.fromstring

Contents

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 ofnumpy.fromstring().

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

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

  • 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

See also

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)
Contents

[8]ページ先頭

©2009-2025 Movatter.jp