mcabbott / mcabbott/TensorCast.jl
@cast works for hcat but not for [ ]
Open
Nobody has claimed this yet.
- Dominant language
- Julia
- Stars
- 142
- Forks
- 12
- PR merge metrics
- No merged PRs in 30d
Description
This works,
@cast P[i,j,k] := hcat(R[:,:,k],X₁[:,k])[i,j]
but this does not
@cast P[i,j,k] := [R[:,:,k] X₁[:,k]][i,j]
It gives the error,
DimensionMismatch: stack expects uniform slices, got axes(x) == (1:3,) while first had (1:3, 1:4)
Should it? Thanks!
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the two examples in Julia, starting at the @cast entry point and comparing hcat with bracket concatenation. No source file or test is named in the issue; done means determining whether [R[:,:,k] X₁[:,k]][i,j] should work and covering the chosen behavior with a regression test.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- julia
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100