Giter VIP home page Giter VIP logo

Comments (8)

alexfikl avatar alexfikl commented on August 26, 2024

As the one responsible for the current code.. Agreed!

from arraycontext.

inducer avatar inducer commented on August 26, 2024

IIUC, you're proposing that ArrayContext.{from,to}_numpy should support containers?

from arraycontext.

kaushikcfd avatar kaushikcfd commented on August 26, 2024

IIUC, you're proposing that ArrayContext.{from,to}_numpy should support containers?

No, just that the logic of what array types are legal to be frozen must be moved the respective implementations. I found this condition:

if isinstance(subary, actx.array_types) or np.isscalar(subary):
to be quite restrictive, as we couldn't convert cl_arrays to NumPy arrays for PytatoPyOpenCLArrayContext.

from arraycontext.

alexfikl avatar alexfikl commented on August 26, 2024

For my understanding, why doesn't PytatoPyOpenCLArrayContext advertise support for both the frozen and unfrozen array types? i.e. for both pt.Array and cl.Array.

from arraycontext.

inducer avatar inducer commented on August 26, 2024

Agree with @alexfikl, that seems like a relatively clean thing to do.

from arraycontext.

kaushikcfd avatar kaushikcfd commented on August 26, 2024

That was because operations like pt.Array+cla.Array aren't defined.

from arraycontext.

inducer avatar inducer commented on August 26, 2024

That was because operations like pt.Array+cla.Array aren't defined.

I think that's alright. array_types just says "these are the possible types that come out of this". It doesn't need to entail a promise of interoperability.

  • If we decide we like this disclaimer, we should add it to the docs.

from arraycontext.

kaushikcfd avatar kaushikcfd commented on August 26, 2024

I agree, I like this. I'll change #160 to implement this. Thanks to both!

from arraycontext.

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.