Code
Hub
Workspaces
Connect
Indexed graphs
Engine
MCP
copy
hub
/
github.com/huggingface/transformers.js
/ arrayToIndexTensor
Function
arrayToIndexTensor
packages/transformers/src/utils/tensor.js:1131–1131 ·
view source on GitHub ↗
(array)
Source
from the content-addressed store, hash-verified
1129
}
1130
1131
const
arrayToIndexTensor = (array) =>
new
Tensor(
'int64'
, array, [array.length]);
1132
/**
1133
* Slice a multidimensional float32 tensor.
1134
* @param {Tensor} data: Tensor of data to extract slices from
Callers
1
slice
Function · 0.85
Calls
no outgoing calls
Tested by
no test coverage detected