Skip to content

Getting initial numpy working #142

Closed
@certik

Description

@certik

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()

Metadata

Metadata

Assignees

No one assigned

    Labels

    numpyBugs and feature requests regarding NumPy support

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions