MCPcopy Create free account
hub / github.com/cogentcore/core / Projection2DSet

Function Projection2DSet

tensor/projection2d.go:151–154  ·  view source on GitHub ↗

Projection2DSet sets a float64 value at given row, col coords for a 2D projection of the given tensor, collapsing higher dimensions down to 2D (and 1D up to 2D). For any odd number of dimensions, the remaining outer-most dimension can either be multipliexed across the row or column, given the oddRow

(tsr Tensor, oddRow bool, row, col int, val float64)

Source from the content-addressed store, hash-verified

149// Even multiples of inner-most dimensions are assumed to be row, then column.
150// RowMajor and ColMajor layouts are handled appropriately.
151func Projection2DSet(tsr Tensor, oddRow bool, row, col int, val float64) {
152 idx := Projection2DIndex(tsr.Shape(), oddRow, row, col)
153 tsr.SetFloat1D(idx, val)
154}

Callers

nothing calls this directly

Calls 3

Projection2DIndexFunction · 0.85
ShapeMethod · 0.65
SetFloat1DMethod · 0.65

Tested by

no test coverage detected