Giter VIP home page Giter VIP logo

Comments (5)

ShrutiRDalvi avatar ShrutiRDalvi commented on May 25, 2024 1

Hello, Is anyone currently working on this, if not I'd love to help out. Thanks

from julia.

dkarrasch avatar dkarrasch commented on May 25, 2024 1

Just go ahead!

from julia.

stevengj avatar stevengj commented on May 25, 2024

Since reverse calls Base._reverse(A, dims), you can overload the latter to dispatch on dims being an integer, e.g.

Base._reverse(A::Diagonal, dims::Integer) = reverse!(Matrix(A); dims)

Should be an easy PR — just add a few of these methods and a test that reverse(A, dims=x) == reverse(Matrix(A), dims=x).

You could also add specialized reverse methods for dims=: (i.e., reversing both dimensions) while you are at it, e.g.

Base._reverse!(A::Diagonal, dims::Colon) = (reverse!(A.diag); A)

(Note that this is the lower-level in-place variant, called by reverse.)

from julia.

ShrutiRDalvi avatar ShrutiRDalvi commented on May 25, 2024

hello, I was struggling a bit with solving this issue. If someone could tell me exactly where(ie in which files) I need to overload the method, that would help a lot, thanks!

from julia.

jishnub avatar jishnub commented on May 25, 2024

Please submit the fixes to the main Julia repo, where you would need to add the methods to "stdlib/LinearAlgebra/src/diagonal.jl" etc. I would recommend extending reverse directly instead of the internal _reverse, as the latter isn't public.

from julia.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.