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

apply not functioning in homepage repl #3340

Closed
gwhitney opened this issue Dec 23, 2024 · 1 comment · Fixed by #3357
Closed

apply not functioning in homepage repl #3340

gwhitney opened this issue Dec 23, 2024 · 1 comment · Fixed by #3357

Comments

@gwhitney
Copy link
Collaborator

gwhitney commented Dec 23, 2024

Describe the bug
The function documentation indicates that apply([[1,2], [3,4]], 1, sum) should produce [3, 7]. However, in the REPL it instead produces the error No access to property "apply".

To Reproduce
Enter apply([[1,2], [3,4]], 1, sum) in the REPL on the homepage.

@dvd101x
Copy link
Collaborator

dvd101x commented Jan 6, 2025

I'm including a relevant discussion.

#3041

josdejong added a commit that referenced this issue Jan 30, 2025
* chore: Rename `apply` to `mapSlices`

  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.

* refactor: changes per PR review

---------

Co-authored-by: Jos de Jong <[email protected]>
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 a pull request may close this issue.

2 participants