RusTorch v0.6.27 - Enhanced Tensor Initialization
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
ToPrimitivefor 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