Giter VIP home page Giter VIP logo

Comments (4)

lazarusA avatar lazarusA commented on July 24, 2024

Oh, yeah... weird, I can reproduce.

from dimensionaldata.jl.

rafaqz avatar rafaqz commented on July 24, 2024

Its not forward ordered tho, so searchsorted wont work.

Probably set should error

from dimensionaldata.jl.

felixcremer avatar felixcremer commented on July 24, 2024

I expected to fully replace the Dimension so that it has an order that fits to the values. If set errors how would you change a dimension?

from dimensionaldata.jl.

rafaqz avatar rafaqz commented on July 24, 2024

Maybe we need to let you set both in the same call so there is never an incorrect state.

The problem with auto-detecting the order in set is it would make every change to the lookup values type-unstable. Normally set is a compile-time op or close to it so you can use it freely in hot paths. It would be unfortunate to lose that. format does these things but its never expected to be type stable and only happens in user called constructors.

But I've been thinking we may need to split set into unsafe_set and set. unsafe_set wouldn't check anything that would lead to type instability, and would be safe for use in hot paths, while set would be safe for users to use in the REPL and would avoid problems like this one.

from dimensionaldata.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.