Skip to content

Use issorted in rangecheck#6

Merged
markmbaum merged 1 commit intomarkmbaum:mainfrom
npbarnes:patch
Oct 28, 2022
Merged

Use issorted in rangecheck#6
markmbaum merged 1 commit intomarkmbaum:mainfrom
npbarnes:patch

Conversation

@npbarnes
Copy link
Copy Markdown
Contributor

This should be slightly more robust. For example, if someone's using Unitful.jl to give their x array units, then all(diff(x) .> 0.0) will cause an error because numbers with units can't be compared with the dimensionless number 0.0. On the other hand, issorted(x) should work for any eltype that defines the less than function.

@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Oct 28, 2022

Codecov Report

Base: 92.32% // Head: 92.32% // No change to project coverage 👍

Coverage data is based on head (eee75d3) compared to base (a488b76).
Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files
@@           Coverage Diff           @@
##             main       #6   +/-   ##
=======================================
  Coverage   92.32%   92.32%           
=======================================
  Files           6        6           
  Lines         534      534           
=======================================
  Hits          493      493           
  Misses         41       41           
Impacted Files Coverage Δ
src/base.jl 94.31% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@markmbaum
Copy link
Copy Markdown
Owner

Right. Sometimes I forget about the built in checks for these conditions.

@markmbaum markmbaum merged commit 1536429 into markmbaum:main Oct 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants