Hi, I found this test caused a bus error on current trunk:
<pre> import numpy as np from StringIO import StringIO as BytesIO from numpy.testing import assert_array_equal def test_2d_buf(): dtt = np.complex64 arr = np.arange(10, dtype=dtt) # 2D array arr2 = np.reshape(arr, (2, 5)) # Fortran write followed by (C or F) read caused bus error data_str = arr2.tostring('F') data_back = np.ndarray(arr2.shape, arr2.dtype, buffer=data_str, order='F') assert_array_equal(arr2, data_back) </pre> gdb run gives ... test_me3.test_2d_buf ... Program received signal SIGBUS, Bus error. 0xf78f5458 in _aligned_strided_to_contig_size8 ( dst=0xdc0e08 "\313\313\313\313\313\313\313\313\313\313\313\313\313\313\313\313\313\313\313\313\313\313\313\313\313\313\313\313\313\313\313\313\313\313\313\313\313\313\313\313\313\313\313\313\313\313\313\313\313\313\313\313\313\313\313\313\313\313\313\313\313\313\313\313\313\313\313\313\313\313\313\313\313\313\313\313\313\313\313\313\373\373\373\373", dst_stride=8, src=0xcdfc44 "", src_stride=16, N=5, __NPY_UNUSED_TAGGEDsrc_itemsize=8, __NPY_UNUSED_TAGGEDdata=0x0) at numpy/core/src/multiarray/lowlevel_strided_loops.c.src:137 137 (*((@type@ *)dst)) = @swap@@elsize@(*((@type@ *)src)); Debug log attached. Shall I make an issue? Best, Matthew
buf_2d.log.gz
Description: GNU Zip compressed data
_______________________________________________ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion