Summary
ChebyshevTT.integrate(dims=, bounds=) translates user-frame dims to
storage positions via a storage_for map (tensor_train.py:1567-1570),
then passes those storage-frame indices to _normalize_bounds in
_calculus.py. When a bound falls outside the domain, the resulting
error message references the storage-frame index, not the user-frame
index the caller passed.
Repro
tt = ChebyshevTT(domain=[(-1,1), (-2,2), (-3,3)], n_nodes=[5,7,3])
tt = tt.with_auto_order()
# Suppose with_auto_order produces _dim_order = [2, 0, 1]
# Storage frame: dim 0 = original dim 2, dim 1 = original dim 0, dim 2 = original dim 1
tt.integrate(dims=[1], bounds=[(5, 6)]) # user-frame dim 1 -> storage position 2
# Current error: "bounds (5, 6) out of domain ... for dim 2"
# User passed dim=1, sees dim=2 in error -- confusing
Impact
Cosmetic — only affects the error path on user input validation.
Correctness paths (in-domain integration) are unaffected.
Suggested fix
Either:
- Pass user-frame dim labels alongside storage indices to
_normalize_bounds for message formatting
- Wrap
_normalize_bounds in tensor_train.py to translate the index
back to user frame before raising
Option 1 is cleaner.
Priority
Minor UX bug. Tracked from PR #18 review.
Summary
ChebyshevTT.integrate(dims=, bounds=)translates user-framedimstostorage positions via a
storage_formap (tensor_train.py:1567-1570),then passes those storage-frame indices to
_normalize_boundsin_calculus.py. When a bound falls outside the domain, the resultingerror message references the storage-frame index, not the user-frame
index the caller passed.
Repro
Impact
Cosmetic — only affects the error path on user input validation.
Correctness paths (in-domain integration) are unaffected.
Suggested fix
Either:
_normalize_boundsfor message formatting_normalize_boundsin tensor_train.py to translate the indexback to user frame before raising
Option 1 is cleaner.
Priority
Minor UX bug. Tracked from PR #18 review.