hpyproject / numpy-hpy Goto Github PK
View Code? Open in Web Editor NEWThis project forked from numpy/numpy
The fundamental package for scientific computing with Python.
Home Page: https://numpy.org
License: Other
This project forked from numpy/numpy
The fundamental package for scientific computing with Python.
Home Page: https://numpy.org
License: Other
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.
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?
array_iter_impl
-> HPySeqIter_New
-> look up __iter__
and call it -> array_iter_impl
.
You can hit this by doing np.range(10).__iter__()
. This was added in 3a7a0d2.
For some reason calling src_cycle = cycle(self.pool)
in setting up the random.bit_generator
is hitting this in PyPy but not in CPython. Maybe cycle
is implemented slightly differently in CPython, and avoids calling self.pool.__iter__()
.
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?
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.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.