Skip to content

Commit a77022d

Browse files
authored
add missing typing (#680)
1 parent 99cb54a commit a77022d

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

code/numpy/carray/carray.c

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,11 @@
2525

2626
#if ULAB_SUPPORTS_COMPLEX
2727

28+
//| import builtins
29+
//|
2830
//| import ulab.numpy
2931

30-
//| def real(val):
32+
//| def real(val: ulab.numpy.ndarray) -> ulab.numpy.ndarray:
3133
//| """
3234
//| Return the real part of the complex argument, which can be
3335
//| either an ndarray, or a scalar."""
@@ -54,7 +56,7 @@ mp_obj_t carray_real(mp_obj_t _source) {
5456

5557
MP_DEFINE_CONST_FUN_OBJ_1(carray_real_obj, carray_real);
5658

57-
//| def imag(val):
59+
//| def imag(val: ulab.numpy.ndarray) -> ulab.numpy.ndarray:
5860
//| """
5961
//| Return the imaginary part of the complex argument, which can be
6062
//| either an ndarray, or a scalar."""
@@ -82,7 +84,9 @@ MP_DEFINE_CONST_FUN_OBJ_1(carray_imag_obj, carray_imag);
8284

8385
#if ULAB_NUMPY_HAS_CONJUGATE
8486

85-
//| def conjugate(val):
87+
//| def conjugate(
88+
//| val: builtins.complex | ulab.numpy.ndarray
89+
//| ) -> builtins.complex | ulab.numpy.ndarray:
8690
//| """
8791
//| Return the conjugate of the complex argument, which can be
8892
//| either an ndarray, or a scalar."""

0 commit comments

Comments
 (0)