Git Product home page Git Product logo

Comments (7)

dlfivefifty avatar dlfivefifty commented on September 23, 2024

sparse(::BlockArray) is just calling the default, which spends a lot of time in findall(x -> x != 0, M). It's possible a faster findall would accomplish the same feat, otherwise, can you file a PR with your createSP implemented via overloading SparseMatrixCSC{Tv,Ti}(M::AbstractBlockArray) where {Tv,Ti} which sparse eventually calls?

There's a question whether sparse(::AbstractBlockArray) should return a block array itself with sparse storage, so as to not lose the block information?

from blockarrays.jl.

rveltz avatar rveltz commented on September 23, 2024

We should limit the type to BlockArray{Tv,2,SparseMatrixCSC{Tv,Ti}}, don't you agree?

I am not sure I am so skilled as to do a pull request ;)

I wanted to check if I missed a point. Also, my function is geared toward blocks with same size.

from blockarrays.jl.

dlfivefifty avatar dlfivefifty commented on September 23, 2024

We should limit the type to BlockArray{Tv,2,SparseMatrixCSC{Tv,Ti}}, don't you agree?

No, as other types have nice sparse representations. Calling sparse(J[Block(i,j)]) should tackle the general case.

But it may be better to create the i, j, z directly, say by modifying sparse(::BandedBlockBandedMatrix): https://github.com/JuliaMatrices/BlockBandedMatrices.jl/blob/e19c22fc9c9e5399976c24aa06a6871bf0133841/src/BandedBlockBandedMatrix.jl#L254

I am not sure I am so skilled as to do a pull request ;)

In open-source software, people maintaining packages have limited time and so are unlikely to add new features that they don't directly benefit from. So if you really want this you'll probably have to do the PR yourself. Given the current state of Julia packages I'd consider being able to make a PR an essential skill to have.

from blockarrays.jl.

rveltz avatar rveltz commented on September 23, 2024

Which file should I put the function in?

from blockarrays.jl.

dlfivefifty avatar dlfivefifty commented on September 23, 2024

If it only works with BlockArray, then probably src/blockarray.jl, otherwise src.abstractblockarray.jl

from blockarrays.jl.

briochemc avatar briochemc commented on September 23, 2024

Did a PR eventually come out of this?

from blockarrays.jl.

dlfivefifty avatar dlfivefifty commented on September 23, 2024

I don't believe so, if you are keen to do one I'm sure it will be appreciated.

from blockarrays.jl.

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.