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

extrema([3,7,4]') throws #951

Closed
mauro3 opened this issue Sep 12, 2022 · 2 comments · Fixed by JuliaLang/julia#46605
Closed

extrema([3,7,4]') throws #951

mauro3 opened this issue Sep 12, 2022 · 2 comments · Fixed by JuliaLang/julia#46605
Labels
bug Something isn't working fold sum, maximum, reduce, foldl, etc.

Comments

@mauro3
Copy link

mauro3 commented Sep 12, 2022

In Julia 1.8 and master:

ulia> extrema([3,7,4]')
ERROR: MethodError: no method matching adjoint(::Tuple{Int64, Int64})
  ...

whereas in 1.7 as expected:

julia> extrema([3,7,4]')
(3, 7)

I guess in the new extrema implementation the transpose somehow is propagated through the computation and then applied to the result-tuple.

@N5N3 N5N3 added fold sum, maximum, reduce, foldl, etc. bug Something isn't working labels Sep 12, 2022
@mcabbott
Copy link
Collaborator

Caused by JuliaLang/julia#39513, sorry.

@mauro3
Copy link
Author

mauro3 commented Sep 13, 2022

No worries! Monkey-patching with Base.extrema(a::LinearAlgebra.Adjoint) = extrema(a') is an easy band-aid.

@KristofferC KristofferC transferred this issue from JuliaLang/julia Nov 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working fold sum, maximum, reduce, foldl, etc.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants