Skip to content

Write an example for a wrapper-function around a numpy function #14

@MilanStaffehl

Description

@MilanStaffehl

The README talks about writing custom wrappers or stubs around/for numpy functions, making assignments type-checkable. Write an example for how one might do this, using the simplest option: creating an array with np.array. This example should use type variables and type var tuples to annotate the shape and dtype, so that type checkers then understand how input translates to the created array.

For an example using shape, np.random.randint is probably much better suited, though.

Metadata

Metadata

Assignees

Labels

documentationImprovements or additions to documentation

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions