[SciPy-dev] Trouble with check loadmat on 64 bit machines

Nils Wagner nwagner at iam.uni-stuttgart.de
Sun Aug 13 05:08:14 CDT 2006


Hi all,

I get 16 errors with

>>> numpy.__version__
'1.0b2.dev3005'
>>> scipy.__version__
'0.5.0.2158'

Three typical messages are below

Traceback (most recent call last):
  File "/usr/lib64/python2.4/site-packages/scipy/io/tests/test_mio.py",
line 79, in cc
    self._check_case(name, expected)
  File "/usr/lib64/python2.4/site-packages/scipy/io/tests/test_mio.py",
line 69, in _check_case
    matdict = loadmat(f)
  File "/usr/lib64/python2.4/site-packages/scipy/io/mio.py", line 801,
in loadmat
    thisdict = _loadv5(fid,basename)
  File "/usr/lib64/python2.4/site-packages/scipy/io/mio.py", line 739,
in _loadv5
    el, varname, unused = _get_element(fid, return_name_dtype=True)
  File "/usr/lib64/python2.4/site-packages/scipy/io/mio.py", line 724,
in _get_element
    el, name = _parse_mimatrix(fid,numbytes)
  File "/usr/lib64/python2.4/site-packages/scipy/io/mio.py", line 605,
in _parse_mimatrix
    result = zeros(length, object)
MemoryError

Traceback (most recent call last):
  File "/usr/lib64/python2.4/site-packages/scipy/io/tests/test_mio.py",
line 79, in cc
    self._check_case(name, expected)
  File "/usr/lib64/python2.4/site-packages/scipy/io/tests/test_mio.py",
line 69, in _check_case
    matdict = loadmat(f)
  File "/usr/lib64/python2.4/site-packages/scipy/io/mio.py", line 801,
in loadmat
    thisdict = _loadv5(fid,basename)
  File "/usr/lib64/python2.4/site-packages/scipy/io/mio.py", line 739,
in _loadv5
    el, varname, unused = _get_element(fid, return_name_dtype=True)
  File "/usr/lib64/python2.4/site-packages/scipy/io/mio.py", line 724,
in _get_element
    el, name = _parse_mimatrix(fid,numbytes)
  File "/usr/lib64/python2.4/site-packages/scipy/io/mio.py", line 575,
in _parse_mimatrix
    result = squeeze(transpose(reshape(result,tupdims)))
  File "/usr/lib64/python2.4/site-packages/numpy/core/fromnumeric.py",
line 62, in reshape
    return reshape(newshape, order=order)
ValueError: total size of new array must be unchanged

Traceback (most recent call last):
  File "/usr/lib64/python2.4/site-packages/scipy/io/tests/test_mio.py",
line 79, in cc
    self._check_case(name, expected)
  File "/usr/lib64/python2.4/site-packages/scipy/io/tests/test_mio.py",
line 69, in _check_case
    matdict = loadmat(f)
  File "/usr/lib64/python2.4/site-packages/scipy/io/mio.py", line 801,
in loadmat
    thisdict = _loadv5(fid,basename)
  File "/usr/lib64/python2.4/site-packages/scipy/io/mio.py", line 739,
in _loadv5
    el, varname, unused = _get_element(fid, return_name_dtype=True)
  File "/usr/lib64/python2.4/site-packages/scipy/io/mio.py", line 724,
in _get_element
    el, name = _parse_mimatrix(fid,numbytes)
  File "/usr/lib64/python2.4/site-packages/scipy/io/mio.py", line 643,
in _parse_mimatrix
    rowind  = _get_element(fid)
  File "/usr/lib64/python2.4/site-packages/scipy/io/mio.py", line 718,
in _get_element
    el = fid.read(numbytes,miDataTypes[dtype][2],c_is_b=1)
  File "/usr/lib64/python2.4/site-packages/scipy/io/mio.py", line 209,
in read
    raise ValueError, "When c_is_b is non-zero then " \
ValueError: When c_is_b is non-zero then count is bytes
and must be multiple of basic size.

Nils



More information about the Scipy-dev mailing list