Skip to content

RusTorch v0.6.27 - Enhanced Tensor Initialization

Choose a tag to compare

@JunSuzukiJapan JunSuzukiJapan released this 01 Oct 06:12
· 5 commits to main since this release
2a84a85

RusTorch v0.6.27 Release

πŸŽ‰ Highlights

New tensor! Macro

Introducing intuitive NumPy-style tensor initialization with compile-time shape inference:

use rustorch::tensor;

// Before
let a = Tensor::from_vec(vec![1.0f32, 2.0, 3.0, 4.0], vec![2, 2]);

// After
let a = tensor!([[1, 2], [3, 4]]);

✨ Features

  • tensor! Macro: Declarative macro for 1D, 2D, and 3D tensors
  • Automatic Type Conversion: Uses ToPrimitive for seamless numeric conversions
  • Compile-time Shape Inference: No runtime overhead
  • Updated README: Modern examples showcasing new syntax

πŸ”§ Fixes

  • Docker Build: Fixed benchmarks workspace member in Dockerfile
  • Code Quality: Applied formatting fixes and import organization
  • Examples: Fixed missing imports in hybrid_error_analysis.rs

πŸ“¦ Installation

[dependencies]
rustorch = "0.6.27"

πŸ“– Documentation

πŸ€– Changes

Full Changelog: v0.6.26...v0.6.27


πŸ€– Generated with Claude Code

Co-Authored-By: Claude noreply@anthropic.com