{"id":21555,"library":"mat-io","title":"mat-io","description":"A modern Python library for reading and writing MATLAB .mat files (v7 and v7.3 formats) with native support for MATLAB datatypes like table, string, datetime, struct, and cell. Version 0.7.1 runs on Python ≥3.11. Development is active, with regular releases.","status":"active","version":"0.7.1","language":"python","source_language":"en","source_url":"https://github.com/foreverallama/matio","tags":["matlab",".mat","file-io","data-science"],"install":[{"cmd":"pip install mat-io","lang":"bash","label":"Install from PyPI"}],"dependencies":[{"reason":"Required for array data handling","package":"numpy","optional":false},{"reason":"Required for v7.3 HDF5-based files","package":"h5py","optional":true}],"imports":[{"wrong":"from matio import MatFileReader","symbol":"load_from_mat","correct":"from matio import load_from_mat"},{"symbol":"save_to_mat","correct":"from matio import save_to_mat"},{"symbol":"whosmat","correct":"from matio import whosmat"}],"quickstart":{"code":"from matio import MatFileReader\nimport os\n\nfilename = 'example.mat'\nif os.path.exists(filename):\n    reader = MatFileReader(filename)\n    data = reader.read()\n    print(data.keys())\nelse:\n    print('File not found.')","lang":"python","description":"Load a .mat file and print variable names."},"warnings":[{"fix":"Upgrade Python to 3.11 or later.","message":"Python >=3.11 required; no support for older Python versions.","severity":"breaking","affected_versions":"<0.5.0 or Python<3.11"},{"fix":"Use missing strings or convert NaN to empty strings before saving.","message":"MATLAB string arrays containing NaN are not supported in write operations (v0.5.2+).","severity":"gotcha","affected_versions":">=0.5.2"},{"fix":"Use mat-io's MatFileReader for proper table/string support.","message":"The old scipy.io.loadmat is not a drop-in replacement; mat-io has different API and handles newer MATLAB types.","severity":"deprecated","affected_versions":"all"}],"env_vars":null,"search_vec":"'0.7.1':33 '3.11':37 'activ':40 'cell':31 'data':50 'data-sci':49 'datatyp':24 'datetim':28 'develop':38 'file':14,47 'file-io':46 'format':18 'io':3,48 'librari':7 'like':25 'mat':2,13,45 'mat-io':1 'matlab':12,23,44 'modern':5 'nativ':20 'python':6,36 'read':9 'regular':42 'releas':43 'run':34 'scienc':51 'string':27 'struct':29 'support':21 'tabl':26 'v7':15 'v7.3':17 'version':32 'write':11","created_at":"2026-04-27T17:00:31.951898+00:00","updated_at":"2026-04-27T17:00:31.951898+00:00","problems":null,"ecosystem":"pypi","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":"1.0.0","cli_name":"","cli_version":null,"type":"library","homepage":null,"github":"https://github.com/foreverallama/matio","docs":null,"changelog":null,"pypi":"https://pypi.org/project/mat-io/","npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["data","serialization"],"base_url":null,"auth_type":null,"provenance":{"verified_status":"passing","verified_at":"2026-06-30","last_verified":"2026-06-30","next_check":"2026-07-30","install_tag":null}}