chore: Rename apply to mapSlices#3357
Merged
josdejong merged 4 commits intojosdejong:developfrom Jan 30, 2025
Merged
Conversation
This renaming conforms with the Julia name for the function formerly called `apply`, and allows it to be called from the expression parser. The previous name `apply` is kept as an alias for `mapSlices`, for backward compatibility. This commit implements an `alias` metadata property for function factories to facilitate the `apply` alias for `mapSlices`. As a separate bonus, this PR corrects several typos in function docs and removes now-passing doc tests from the list of "known failing" doc tests to get down to 45 known failures and 136 total issues in doc tests. (Most of the excess of 136 as compared to 45 are just due to roundoff error/slight inaccuracy of what the documentation claims the result will be and the actual result returned by mathjs. When the 45 are eliminated, a reasonable numeric tolerance can be decided on for doc testing and then the doc tests can be made binding rather than advisory.
josdejong
requested changes
Jan 29, 2025
test/unit-tests/expression/transform/mapSlices.transform.test.js
Outdated
Show resolved
Hide resolved
josdejong
approved these changes
Jan 30, 2025
Owner
|
Published now in |
dvd101x
reviewed
Feb 15, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This renaming conforms with the Julia name for the function formerly
called
apply, and allows it to be called from the expression parser.The previous name
applyis kept as an alias formapSlices, forbackward compatibility. This commit implements an
aliasmetadataproperty for function factories to facilitate the
applyalias formapSlices.As a separate bonus, this PR corrects several typos in function docs
and removes now-passing doc tests from the list of "known failing" doc
tests to get down to 45 known failures and 136 total issues in doc tests.
(Most of the excess of 136 as compared to 45 are just due to roundoff
error/slight inaccuracy of what the documentation claims the result will
be and the actual result returned by mathjs. When the 45 are eliminated,
a reasonable numeric tolerance can be decided on for doc testing and
then the doc tests can be made binding rather than advisory.
Also adds embedded docs for mapSlices, which were not present for
apply, perhaps because it could not be used from the parser.
Resolves #3041.
Resolves #3340.