Skip to content

Getting initial numpy working #142

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
certik opened this issue Feb 14, 2022 · 2 comments
Closed

Getting initial numpy working #142

certik opened this issue Feb 14, 2022 · 2 comments
Labels
numpy Bugs and feature requests regarding NumPy support

Comments

@certik
Copy link
Contributor

certik commented Feb 14, 2022

Here is a simple example:

from numpy import empty, int32, all

def main0():
    x: i32[5] = empty(5, dtype=int32)
    x[:] = (2+3)*5
    assert all(x == 25)

main0()

or:

from numpy import empty, int32

def main0():
    x: i32[2] = empty(2, dtype=int32)
    x[0] = 3
    x[1] = 4
    assert x[0] == 3 && x[1] == 4

main0()
@certik
Copy link
Contributor Author

certik commented Mar 4, 2022

Later, implement the most commonly used functionality, for example what CuPy implements: https://docs.cupy.dev/en/stable/reference/index.html

@certik certik added the numpy Bugs and feature requests regarding NumPy support label Jan 24, 2023
@certik
Copy link
Contributor Author

certik commented Jan 24, 2023

I think this issue is fixed. See #1458 for the CuPy support.

@certik certik closed this as completed Jan 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
numpy Bugs and feature requests regarding NumPy support
Projects
None yet
Development

No branches or pull requests

1 participant