jax-js
System
Light
Dark
Search…
Preparing search index...
@jax-js/jax
numpy
fromfunction
Function fromfunction
fromfunction
(
func
:
(
...
indices
:
Array
[]
)
=>
ArrayLike
,
shape
:
number
[]
,
opts
?:
{
device
?:
Device
;
dtype
?:
DType
}
,
)
:
Array
Construct an array by applying a function over each coordinate.
Parameters
func
:
(
...
indices
:
Array
[]
)
=>
ArrayLike
shape
:
number
[]
Optional
opts
:
{
device
?:
Device
;
dtype
?:
DType
}
Returns
Array
fromfunction
<
Tree
extends
{
[
key
:
string
]:
JsTree
<
ArrayLike
>
}
|
JsTree
<
ArrayLike
>
[]
,
>
(
func
:
(
...
indices
:
Array
[]
)
=>
Tree
,
shape
:
number
[]
,
opts
?:
{
device
?:
Device
;
dtype
?:
DType
}
,
)
:
MappedJsTree
<
Tree
,
ArrayLike
,
Array
>
Construct an array by applying a function over each coordinate.
Type Parameters
Tree
extends
{
[
key
:
string
]:
JsTree
<
ArrayLike
>
}
|
JsTree
<
ArrayLike
>
[]
Parameters
func
:
(
...
indices
:
Array
[]
)
=>
Tree
shape
:
number
[]
Optional
opts
:
{
device
?:
Device
;
dtype
?:
DType
}
Returns
MappedJsTree
<
Tree
,
ArrayLike
,
Array
>
jax-js
Loading...
Construct an array by applying a function over each coordinate.