Code Monkey home page Code Monkey logo

numpy-hpy's Issues

Update the branches

What is the status of the hpy, graal-team/hpy and graal-team/hpy-0.0.5 branches here?

hpyproject/hpy HEAD now has more support for the interfaces needed here, and NumPy HEAD has progressed. It would be nice to update this fork and add a blurb to the README so others can try it out.

Missing `tp_traverse`

There is a missing tp_traverse on the New_PyArrayDescr_spec (which derives from the New_PyArrayDescr_spec_prototype), since PyArray_Descr has HPyFields. PyPy requires these, and will not let HPyField_Store work if the tp_traverse is missing. Since HPyField_Store has a void return value, PyPy will exit. I will submit a PR to add the missing tp_traverse and also raise a HPy issue to change the return value so an error can properly be reported.

Building with PyPy

When building, I get lots of warnings about using forbidden API. I think this is because the code builds with HPY_ABI_UNIVERSAL. Shouldn't it use HPY_ABI_HYBRID until the migration is complete?

Are Numpy API functions for creating legacy dtypes still necessary?

I currently try to get rid of HPy_SetType in branch graal-team/hpy . We used it (as a replacement for Py_SET_TYPE) in function dtypemeta_wrap_legacy_descriptor. I was able to refactor the creation of (_hpy)_builtin_descrs (see https://github.com/hpyproject/numpy-hpy/blob/graal-team/hpy/numpy/core/src/multiarray/arraytypes.c.src#L4842). I did so by first creating the new dtype and then instantiating the singleton. However, it is not that simple for Numpy API (H)PyArray_RegisterDataType because the descriptor to register is provided as argument (e.g. sometimes created with (H)PyArray_DescrNew).

My question is: are (H)PyArray_DescrNew and (H)PyArray_RegisterDataType legacy APIs that have some replacement and could we just drop them in Numpy/HPy?
Or is there some other way to solve this?

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.