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

chore: Rename apply to mapSlices #3357

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

gwhitney
Copy link
Collaborator

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.

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.

  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.
@gwhitney gwhitney added the category:expressions Issues about the expression parser, variable scoping etc. label Jan 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category:expressions Issues about the expression parser, variable scoping etc.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

apply not functioning in homepage repl
1 participant