Giter VIP home page Giter VIP logo

Comments (2)

vtjnash avatar vtjnash commented on May 25, 2024

It looks like there is a fault with how InvertedIndices implements its own computation of picks, which fails its own boundscheck implementation:

julia> axes(Base.to_indices(A, (Not(z),))[1].picks)
(Base.OneTo(24),)

julia> axes(A)
(Base.OneTo(3), Base.OneTo(2), Base.OneTo(4))

The issue looks like it might have been pirating Base.to_indices before, resulting in slightly different calls to its own internal functions, causing this change to uncover a bug in the package's boundscheck implementation.

from julia.

mbauman avatar mbauman commented on May 25, 2024

Yeah, effectively what's happening here is that InvertedIndices needs to guess whether Base would generate linear or cartesian indices out of the non-not flavor of to_indices β€”Β and then tries to match it so it can iterate (and compare) both the "picks" and the "skips" in lock-step. It is currently trying to workaround around what was Base's inconsistency that #45869 addressed:

https://github.com/JuliaData/InvertedIndices.jl/blob/b7d7ce078888b2966f4e9acee80170bc48612fa0/src/InvertedIndices.jl#L184-L191

That said, its paired iteration strategy is just too clever for its own good and isn't achieving the performance it intended. That was initially my doing, and we should probably just go back to an eager vector.

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.