<h3 dir="auto">Describe your issue.</h3>
<p dir="auto">We are running into issues reading and writing SET files that were created with Matlab 7.3 (using the HDF5 format). We were wondering whether there was a plan to support more recent versions of Matlab and the HDF5 format for electrophysiological recordings.</p>
<p dir="auto">Here is part of a traceback we get when running scipy on such files:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="  File &quot;/opt/loris/bin/mri/python/lib/utilities.py&quot;, line 177, in update_set_file_path_info
    dataset = scipy.io.loadmat(set_file)
  File &quot;/opt/loris/bin/mri/python_virtualenvs/loris-mri-python/lib/python3.8/site-packages/scipy/io/matlab/_mio.py&quot;, line 225, in loadmat
    MR, _ = mat_reader_factory(f, **kwargs)
  File &quot;/opt/loris/bin/mri/python_virtualenvs/loris-mri-python/lib/python3.8/site-packages/scipy/io/matlab/_mio.py&quot;, line 80, in mat_reader_factory
    raise NotImplementedError('Please use HDF reader for matlab v7.3 files')
NotImplementedError: Please use HDF reader for matlab v7.3 files"><pre class="notranslate"><code class="notranslate">  File "/opt/loris/bin/mri/python/lib/utilities.py", line 177, in update_set_file_path_info
    dataset = scipy.io.loadmat(set_file)
  File "/opt/loris/bin/mri/python_virtualenvs/loris-mri-python/lib/python3.8/site-packages/scipy/io/matlab/_mio.py", line 225, in loadmat
    MR, _ = mat_reader_factory(f, **kwargs)
  File "/opt/loris/bin/mri/python_virtualenvs/loris-mri-python/lib/python3.8/site-packages/scipy/io/matlab/_mio.py", line 80, in mat_reader_factory
    raise NotImplementedError('Please use HDF reader for matlab v7.3 files')
NotImplementedError: Please use HDF reader for matlab v7.3 files
</code></pre></div>
<p dir="auto">Could you kindly let us know if that is on your roadmap and if it is, when approximately do you expect to have the fix out?</p>
<p dir="auto">Thank you very much in advance for your feedback. Best,</p>
<h3 dir="auto">Reproducing Code Example</h3>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="dataset = scipy.io.loadmat(set_file)"><pre class="notranslate"><span class="pl-s1">dataset</span> <span class="pl-c1">=</span> <span class="pl-s1">scipy</span>.<span class="pl-s1">io</span>.<span class="pl-en">loadmat</span>(<span class="pl-s1">set_file</span>)</pre></div>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="

### Error message

```shell
File &quot;/opt/loris/bin/mri/python/lib/utilities.py&quot;, line 177, in update_set_file_path_info
    dataset = scipy.io.loadmat(set_file)
  File &quot;/opt/loris/bin/mri/python_virtualenvs/loris-mri-python/lib/python3.8/site-packages/scipy/io/matlab/_mio.py&quot;, line 225, in loadmat
    MR, _ = mat_reader_factory(f, **kwargs)
  File &quot;/opt/loris/bin/mri/python_virtualenvs/loris-mri-python/lib/python3.8/site-packages/scipy/io/matlab/_mio.py&quot;, line 80, in mat_reader_factory
    raise NotImplementedError('Please use HDF reader for matlab v7.3 files')
NotImplementedError: Please use HDF reader for matlab v7.3 files"><pre class="notranslate"><code class="notranslate">

### Error message

```shell
File "/opt/loris/bin/mri/python/lib/utilities.py", line 177, in update_set_file_path_info
    dataset = scipy.io.loadmat(set_file)
  File "/opt/loris/bin/mri/python_virtualenvs/loris-mri-python/lib/python3.8/site-packages/scipy/io/matlab/_mio.py", line 225, in loadmat
    MR, _ = mat_reader_factory(f, **kwargs)
  File "/opt/loris/bin/mri/python_virtualenvs/loris-mri-python/lib/python3.8/site-packages/scipy/io/matlab/_mio.py", line 80, in mat_reader_factory
    raise NotImplementedError('Please use HDF reader for matlab v7.3 files')
NotImplementedError: Please use HDF reader for matlab v7.3 files
</code></pre></div>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="

### SciPy/NumPy/Python version information

1.9.3"><pre class="notranslate"><code class="notranslate">

### SciPy/NumPy/Python version information

1.9.3
</code></pre></div>
<p dir="auto"><strong>Is your feature request related to a problem? Please describe.</strong><br>
Currently, <code class="notranslate">scipy</code> is unable to load MATLAB files that are saved with the new MATLAB file format.<br>
Attempting to load them will raise an</p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="NotImplementedError: Please use HDF reader for matlab v7.3 files"><pre class="notranslate"><span class="pl-v">NotImplementedError</span>: <span class="pl-v">Please</span> <span class="pl-s1">use</span> <span class="pl-v">HDF</span> <span class="pl-s1">reader</span> <span class="pl-k">for</span> <span class="pl-s1">matlab</span> <span class="pl-s1">v7</span>.<span class="pl-c1">3</span> <span class="pl-s1">files</span></pre></div>
<p dir="auto"><strong>Describe the solution you'd like</strong></p>
<p dir="auto">I've implemented a small library that can also load MATLAB 7.3<br>
<a href="https://github.com/skjerns/mat7.3">https://github.com/skjerns/mat7.3</a> , using <code class="notranslate">h5py</code>.<br>
It will load all data with the indicated MATLAB datatype into a dict, so similar to <code class="notranslate">scipy.io.loadmat</code>.</p>
<p dir="auto">Do you think it makes sense to integrate this directly into scipy?</p>
<p dir="auto"><strong>Describe alternatives you've considered</strong></p>
<p dir="auto">Just leaving it as it is might be actually okay, as adding it would introduce a dependency on <code class="notranslate">h5py</code> (which is not a dependency of scipy afaik?). what do you think?</p>