Skip to content

Normalize string dims across all xtensor paths#2146

Merged
ricardoV94 merged 2 commits into
pymc-devs:mainfrom
williambdean:string-dims-all-paths
May 19, 2026
Merged

Normalize string dims across all xtensor paths#2146
ricardoV94 merged 2 commits into
pymc-devs:mainfrom
williambdean:string-dims-all-paths

Conversation

@williambdean
Copy link
Copy Markdown
Contributor

Summary

Normalizes bare string dims to single-element tuples in all xtensor paths that iterate over dims, preventing unintended character iteration.

Previously only XTensorType.__init__ and _extract_data_and_dims were fixed (PR #2129). This follows up on the spots that were missed:

  • XTensorFromTensor.__init__ — covers as_xtensor(tensor_var, dims="repo")
  • cholesky — covers cholesky(x, dims="ab")
  • solve — covers solve(a, b, dims="abc")

Closes #1793

@williambdean williambdean marked this pull request as ready for review May 19, 2026 13:18
@ricardoV94 ricardoV94 merged commit f3dd076 into pymc-devs:main May 19, 2026
66 checks passed
@williambdean williambdean deleted the string-dims-all-paths branch May 19, 2026 14:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

support string dims in as_xtensor

2 participants