Giter Club home page Giter Club logo

Comments (4)

scoder avatar scoder commented on May 31, 2024

Therefore, split tuples into suitable and unsuitable, and use existing code generation for unsuitable.

Don't we do that already with the is_literal and is_partly_literal flags?

from cython.

da-woods avatar da-woods commented on May 31, 2024

Don't we do that already with the is_literal and is_partly_literal flags?

Possibly? I think that is_partly_literal is about the multiplication factor.

What I was worried about was if you'd managed to make a tuple that contained another literal initialized at the same time (like slice for example), which would work now because things are processed in order, but not if we did tuples before slices. I'm not sure it's possible to get a slice literal into a tuple though, but I don't know that it isn't.

Either way - it's a detail of a rough outline for later

from cython.

TeamSpen210 avatar TeamSpen210 commented on May 31, 2024

Slices can hold any object whatsoever, obj[(1,2):3, 4] works fine. Though I’ve never heard of that being used for anything, probably better to just bail to regular generated code in those cases. It’d make more sense to do tuples after slices, since array[1:2, 3:4] would be common in Numpy etc code.

from cython.

scoder avatar scoder commented on May 31, 2024

Yes, you can have tuples with slices and slices with tuples. Difficult to map this to a table then.

from cython.

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.