Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

StepRange with float-based quantities should error #552

Open
sostock opened this issue Sep 2, 2022 · 0 comments · May be fixed by #560
Open

StepRange with float-based quantities should error #552

sostock opened this issue Sep 2, 2022 · 0 comments · May be fixed by #560
Labels

Comments

@sostock
Copy link
Collaborator

sostock commented Sep 2, 2022

When dealing with floating-point numbers, StepRangeLen should be used instead of StepRange. However, this is currently allowed:

julia> StepRange(1.0u"m", 1.0u"m", 3.0u"m")
(1.0:1.0:3.0) m

I would argue that it should error, like it does for unitless numbers:

julia> StepRange(1.0, 1.0, 3.0)
ERROR: ArgumentError: StepRange should not be used with floating point
[...]
@sostock sostock linked a pull request Sep 15, 2022 that will close this issue
@sostock sostock added the v2.0 label Jul 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant