compute.tensor · function ·
TensorRankFromShape
Tensor rank from shape.
Represent tensor shapes, layouts, and numerical storage contracts.
external TensorRankFromShape(tensorShape shape) returns intStatus: source-declared
Parameters
tensorShape shape- Supply shape as tensorShape.
Use TensorRankFromShape
A complete small caller. Values are illustrative; check the returned result and package requirements before connecting live resources.
cpu · source-example · type checked
using compute.tensor
// Represent tensor shapes, layouts, and numerical storage contracts.
tensorShape shape = tensorShape("element Type", [])
int result = TensorRankFromShape(shape)
Console.Log(Text.From(result))
project.mech
manifestVersion = "2"
package = "api.example.compute_tensor__tensorrankfromshape"
version = "0.1.0"
languageEdition = "yeho-core-2026.1"
[app]
kind = "headless"
[[dependencies]]
package = "compute.tensor"
version = "0.1.0"
path = "../../../yeho/packages/compute/tensor"
[[dependencies]]
package = "console"
version = "0.1.0"
path = "../../../yeho/packages/console"
[[dependencies]]
package = "diagnostics"
version = "0.1.0"
path = "../../../yeho/packages/diagnostics"
Notes and source
Package presence and a declaration do not establish support on every host. Host services need their platform and lifecycle setup.
yeho/packages/compute/tensor/tensor.yh:784