Commit 800d96eb authored by Robert Bradshaw's avatar Robert Bradshaw

merge main branch to devel

parents 48358568 1c0020cb
This diff is collapsed.
...@@ -195,6 +195,11 @@ try: ...@@ -195,6 +195,11 @@ try:
... ...
ValueError: Item size of buffer (1 byte) does not match size of 'int' (4 bytes) ValueError: Item size of buffer (1 byte) does not match size of 'int' (4 bytes)
>>> test_complextypes()
1,1
1,1
8,16
""" """
except: except:
__doc__ = u"" __doc__ = u""
...@@ -376,3 +381,15 @@ def test_unpacked_align(np.ndarray[UnpackedStruct] arr): ...@@ -376,3 +381,15 @@ def test_unpacked_align(np.ndarray[UnpackedStruct] arr):
arr[0].a = 22 arr[0].a = 22
arr[0].b = 23 arr[0].b = 23
return repr(arr).replace('<', '!').replace('>', '!') return repr(arr).replace('<', '!').replace('>', '!')
def test_complextypes():
cdef np.complex64_t x64 = 1, y64 = 1j
cdef np.complex128_t x128 = 1, y128 = 1j
x64 = x64 + y64
print "%.0f,%.0f" % (x64.real, x64.imag)
x128 = x128 + y128
print "%.0f,%.0f" % (x128.real, x128.imag)
print "%d,%d" % (sizeof(x64), sizeof(x128))
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment