[SciPy-user] Re: io.loadmat
Andrew Straw
astraw at insightscientific.com
Tue Oct 14 20:11:22 EDT 2003
John Hunter wrote:
>>>>>>"Nils" == Nils Wagner <wagner.nils at vdi.de> writes:
>
>
> Nils> Thank you for your note. However, I am not the right person
> Nils> for doing that. It would be great if someone else can do
> Nils> that. Thanks in advance.
>
>
> Have you seen matfile? It will load matlab version 5 into Numeric
> arrays
>
> See
> http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&oe=UTF-8&safe=off&threadm=m3g09ck23n.fsf%40nmw-office.ion.le.ac.uk&rnum=2&prev=/groups%3Fnum%3D20%26hl%3Den%26lr%3D%26ie%3DUTF-8%26oe%3DUTF-8%26safe%3Doff%26q%3Dmatfile%2Bpython%26sa%3DN%26tab%3Dwg
>
> and the src at ftp://ion.le.ac.uk/matfile/matfile.tar.gz
Cool! I hadn't seen that before, and it seems to work on the simple
test case I tried. I made a setup script rather than fiddling with the
Makefile. This seems like a useful enough utility that it should get
wider exposure. Too bad it can't be incorporated into scipy as is (GPL
vs. BSD license issues...).
#!/usr/bin/env python
"""Setup script for matfile
"""
from distutils.core import setup, Extension
import distutils.sysconfig
import os
numpy_inc_dir = os.path.join(distutils.sysconfig.get_python_inc(),'Numeric')
matfile_dir = 'matfile' # off current directory
matfile_srcs = ['mat_open.c', 'mat_read_array.c', 'mat_copy_data.c',
'mat_free_array.c', 'mat_read_array4.c', 'mat_write_array4.c',
'mat_read_array5.c', 'mat_subarray5.c', 'mat_utils5.c']
matfile_srcs = [ os.path.join(matfile_dir,src) for src in matfile_srcs ]
setup(name="matfile",
description = "MATLAB .mat file reader for Python",
author = "Nigel Wade",
author_email = "nmw at ion.le.ac.uk",
license = "GNU GPL",
ext_modules = [Extension(name='matfile',
sources=['matfilemodule.c']+matfile_srcs,
include_dirs=[matfile_dir,
numpy_inc_dir])])
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 155 bytes
Desc: not available
URL: <http://mail.scipy.org/pipermail/scipy-user/attachments/20031015/dc3032f9/attachment.sig>
More information about the SciPy-User
mailing list