MeasureTransport / MeasureTransport/MParT
Document `mset.Size` versus `len(mset)` in Python (and Julia?)
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 18
- Forks
- 5
- PR merge metrics
- No merged PRs in 30d
Description
This is something that isn't very well documented and has tripped me up before, and has now tripped up @rubiop on an example. This should probably be documented well because using the wrong one can cause insidious and misleading behavior.
Honestly, we may want to think about renaming, since "size" could easily mean dimension of input or number of elements in the set and "length" honestly seems to me like "number of elements in the set". If we did this, it would (clearly) be breaking so renaming is a change that we save for 3.0. Personally, I would suggest using Cardinality instead of Size to indicate that it's the number of elements in a set, and Dim(ension) instead of Length to show it's about dimension, but those are my two cents.
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
Locate the Python and Julia documentation for mset.Size and len(mset), then compare how each operation is described. Document that Size refers to the number of elements while len refers to the input dimension, including the misleading behavior caused by confusing them. Treat the proposed renaming as separate future work because the issue identifies it as a breaking change for 3.0.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- julia, python
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100