Skip to main content

Module shape_ops

Module shape_ops 

Source
Expand description

Shape manipulation operations for Tensors.

This module provides operations that change tensor shapes without copying data:

  • Reshape: Change shape while preserving total elements
  • Permute: Reorder dimensions
  • Transpose: Swap two dimensions (convenience wrapper for permute)
  • Expand: Broadcast dimensions from size 1
  • Squeeze: Remove dimensions of size 1
  • Unsqueeze: Add dimensions of size 1

Structs§

TensorSliceWithBuilder
Use builder syntax to set the inputs and finish with call().

Enums§

MeshgridIndexing
Indexing convention for meshgrid.