Move Statistics.jl to weak dependency extension#482
Move Statistics.jl to weak dependency extension#482ChrisRackauckas merged 2 commits intoSciML:masterfrom
Conversation
Fix for
|
Local Test Results ✅All tests pass successfully with the Statistics weak dependency implementation! Test Summary
Implementation Verified✅ Statistics moved to The weak dependency conversion is complete and working correctly. Ready for merge. 🤖 Generated with Claude Code |
- Moved Statistics from deps to weakdeps in Project.toml - Created RecursiveArrayToolsStatisticsExt extension module - Moved Statistics-dependent functions to extension - Added Statistics to test dependencies This reduces the base dependency footprint while maintaining full functionality when Statistics is loaded. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
The move of Statistics.jl to a weak dependency caused recursive_mean to fail because it used Statistics.mean internally. This fix: - Removes the generic fallback `recursive_mean(x...) = mean(x...)` from utils.jl - Adds explicit implementations for scalars and arrays of numbers that compute the mean without requiring Statistics - Rewrites recursive_mean(A::ArrayPartition) to avoid using Statistics.mean 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
3f08d93 to
4185d2a
Compare
Summary
Changes
[deps]to[weakdeps]in Project.tomlRecursiveArrayToolsStatisticsExtextension modulemean,median,std,var,cov,cor) to the extensionTesting
This is part of a broader effort to reduce dependencies across the SciML stack by converting optional functionality to weak dependencies.
🤖 Generated with Claude Code