Tensor Operations in IronPython QuickStart Sample
Illustrates how to perform operations on tensors in IronPython.
This sample is also available in: C#, Visual Basic, F#.
Overview
This QuickStart sample demonstrates how to perform common operations on tensors using Numerics.NET.
The sample covers fundamental tensor operations including arithmetic operations (addition, subtraction, multiplication, division), broadcasting operations between tensors of different shapes, mathematical functions applied to tensors, conditional operations using masks, reduction operations like sum and mean, and working with tensor views. It shows how to:
- Create tensors and perform basic arithmetic operations
- Use broadcasting to operate on tensors with different shapes
- Apply mathematical functions to tensors
- Use conditional operations with masks to selectively modify tensor elements
- Perform reduction operations along specified axes
- Work with tensor views that share underlying storage
- Manipulate complex-valued tensors using real and imaginary parts
The sample includes detailed examples with output showing the results of each operation, making it ideal for developers new to tensor operations or those wanting to understand how to efficiently work with multi-dimensional arrays in Numerics.NET.
The code
Coming soon...