summaryrefslogtreecommitdiff
path: root/tests/run/complex_extern_GH1433.pyx
blob: 60d0df8da70301bf8990e6465c39f0f01e1f2923 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# tag: numpy

cimport numpy as np

def divide(np.float64_t x, np.complex128_t y):
    """
    >>> divide(2, 1+1j)
    (1-1j)
    """
    return x / y

def pow(np.complex128_t x, np.complex128_t y):
    """
    >>> pow(1 + 1j, 2j)  # doctest: +ELLIPSIS
    (0.1599...+0.1328...j)
    """
    return x ** y