Skip to content

bug: TNS range assignment is forbidden. #37

@python-processing-unit

Description

@python-processing-unit

According to the specification section 3:

Slice indexing: any index position inside [...] may be a range of the form lo-hi where lo and hi are ordinary index expressions. A range selects the contiguous inclusive span of positions from lo to hi (both endpoints follow the same one-based and negative-index rules described above). Slices may be mixed with hard indices (for example, tensor[lo-hi, i]) and reduce the dimensionality of the selected result according to which positions are fixed versus sliced: selecting one or more ranges produces a TNS value whose shape equals the lengths of the specified ranges (in the same order). Assigning to a slice is supported: the left-hand side may use ranges in its indices, and the right-hand-side expression must evaluate to a TNS whose shape exactly matches the selected slice. Elementwise type compatibility is required: each element being written must match the static element type of the target position, otherwise a runtime error is raised. Example: tensor[10-11] = [1,11] writes a two-element tensor into the slice consisting of positions 10 and 11.

In the implementation, however, assignment to a range is forbidden.

Metadata

Metadata

Labels

bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions