<?xml version='1.0' encoding='UTF-8' standalone='no'?>
<doxygen xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="compound.xsd" version="1.8.14">
  <compounddef id="python2matlab_8m" kind="file" language="Objective-C">
    <compoundname>python2matlab.m</compoundname>
      <sectiondef kind="var">
      <memberdef kind="variable" id="python2matlab_8m_1a38eb17ed6618368f316396c2fb4bbb67" prot="public" static="no" mutable="no">
        <type>function</type>
        <definition>x_ml</definition>
        <argsstring></argsstring>
        <name>x_ml</name>
        <initializer>= python2matlab(x_py)
  if isa(x_py, &apos;py.float&apos;)
    x_ml = float(x_py)</initializer>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/root/cis_interface/cis_interface/cis_interface/interface/python2matlab.m" line="1" column="1" bodyfile="/root/cis_interface/cis_interface/cis_interface/interface/python2matlab.m" bodystart="1" bodyend="-1"/>
      </memberdef>
      <memberdef kind="variable" id="python2matlab_8m_1ae601d874fdc5432eb9caf65d85121573" prot="public" static="no" mutable="no">
        <type></type>
        <definition>dict_keys</definition>
        <argsstring></argsstring>
        <name>dict_keys</name>
        <initializer>= python2matlab(py.list(keys(x_py)))</initializer>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/root/cis_interface/cis_interface/cis_interface/interface/python2matlab.m" line="18" column="1" bodyfile="/root/cis_interface/cis_interface/cis_interface/interface/python2matlab.m" bodystart="18" bodyend="-1"/>
      </memberdef>
      <memberdef kind="variable" id="python2matlab_8m_1a7982767c726dbc19780a108e82eea566" prot="public" static="no" mutable="no">
        <type></type>
        <definition>dict_vals</definition>
        <argsstring></argsstring>
        <name>dict_vals</name>
        <initializer>= python2matlab(py.list(values(x_py)))</initializer>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/root/cis_interface/cis_interface/cis_interface/interface/python2matlab.m" line="19" column="1" bodyfile="/root/cis_interface/cis_interface/cis_interface/interface/python2matlab.m" bodystart="19" bodyend="-1"/>
      </memberdef>
      <memberdef kind="variable" id="python2matlab_8m_1a6f6ccfcf58b31cb6412107d9d5281426" prot="public" static="no" mutable="no">
        <type>for</type>
        <definition>for i</definition>
        <argsstring></argsstring>
        <name>i</name>
        <initializer>= 1:nr
      for j = 1:nc
	x_ml{i, j} = python2matlab(x_ml{i, j})</initializer>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/root/cis_interface/cis_interface/cis_interface/interface/python2matlab.m" line="24" column="1" bodyfile="/root/cis_interface/cis_interface/cis_interface/interface/python2matlab.m" bodystart="24" bodyend="-1"/>
      </memberdef>
      <memberdef kind="variable" id="python2matlab_8m_1afb358f48b1646c750fb9da6c6585be2b" prot="public" static="no" mutable="no">
        <type></type>
        <definition>end</definition>
        <argsstring></argsstring>
        <name>end</name>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/root/cis_interface/cis_interface/cis_interface/interface/python2matlab.m" line="27" column="1" bodyfile="/root/cis_interface/cis_interface/cis_interface/interface/python2matlab.m" bodystart="27" bodyend="-1"/>
      </memberdef>
      <memberdef kind="variable" id="python2matlab_8m_1a62f301c7a2d017555922c9499f95ea91" prot="public" static="no" mutable="no">
        <type></type>
        <definition>elseif char_code</definition>
        <argsstring></argsstring>
        <name>char_code</name>
        <initializer>= char(x_py.dtype.kind)</initializer>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/root/cis_interface/cis_interface/cis_interface/interface/python2matlab.m" line="31" column="1" bodyfile="/root/cis_interface/cis_interface/cis_interface/interface/python2matlab.m" bodystart="31" bodyend="-1"/>
      </memberdef>
      <memberdef kind="variable" id="python2matlab_8m_1a67749cad3fa05c9d291c7b6a6acb9dce" prot="public" static="no" mutable="no">
        <type></type>
        <definition>is_struct</definition>
        <argsstring></argsstring>
        <name>is_struct</name>
        <initializer>= false</initializer>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/root/cis_interface/cis_interface/cis_interface/interface/python2matlab.m" line="32" column="1" bodyfile="/root/cis_interface/cis_interface/cis_interface/interface/python2matlab.m" bodystart="32" bodyend="-1"/>
      </memberdef>
      <memberdef kind="variable" id="python2matlab_8m_1a1b13c496dab2aab4b500c471b2bec860" prot="public" static="no" mutable="no">
        <type>if</type>
        <definition>if ndim</definition>
        <argsstring></argsstring>
        <name>ndim</name>
        <initializer>== 2
      x_ml = transpose(x_ml)</initializer>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/root/cis_interface/cis_interface/cis_interface/interface/python2matlab.m" line="41" column="1" bodyfile="/root/cis_interface/cis_interface/cis_interface/interface/python2matlab.m" bodystart="41" bodyend="-1"/>
      </memberdef>
      </sectiondef>
      <sectiondef kind="func">
      <memberdef kind="function" id="python2matlab_8m_1ad7cd9170aaf4f70b9cdaca82bacd053b" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>elseif</type>
        <definition>elseif isa</definition>
        <argsstring>(x_py, &apos;py.double&apos;) x_ml</argsstring>
        <name>isa</name>
        <param>
          <type>x_py</type>
        </param>
        <param>
          <type>&apos;py.double&apos;</type>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/root/cis_interface/cis_interface/cis_interface/interface/python2matlab.m" line="4" column="1"/>
      </memberdef>
      <memberdef kind="function" id="python2matlab_8m_1ab9fcb3e6061950c4d99f2eb3dc3887c9" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>elseif</type>
        <definition>elseif isa</definition>
        <argsstring>(x_py, &apos;py.int&apos;) x_ml</argsstring>
        <name>isa</name>
        <param>
          <type>x_py</type>
        </param>
        <param>
          <type>&apos;py.int&apos;</type>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/root/cis_interface/cis_interface/cis_interface/interface/python2matlab.m" line="6" column="1"/>
      </memberdef>
      <memberdef kind="function" id="python2matlab_8m_1ac07570a5162ad750e8b7ea8682ce0392" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>elseif</type>
        <definition>elseif isa</definition>
        <argsstring>(x_py, &apos;py.bytes&apos;) x_ml</argsstring>
        <name>isa</name>
        <param>
          <type>x_py</type>
        </param>
        <param>
          <type>&apos;py.bytes&apos;</type>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/root/cis_interface/cis_interface/cis_interface/interface/python2matlab.m" line="8" column="1"/>
      </memberdef>
      <memberdef kind="function" id="python2matlab_8m_1a7c24b60071a8e177992054fb012001b0" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>elseif</type>
        <definition>elseif isa</definition>
        <argsstring>(x_py, &apos;py.string&apos;) x_ml</argsstring>
        <name>isa</name>
        <param>
          <type>x_py</type>
        </param>
        <param>
          <type>&apos;py.string&apos;</type>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/root/cis_interface/cis_interface/cis_interface/interface/python2matlab.m" line="10" column="1"/>
      </memberdef>
      <memberdef kind="function" id="python2matlab_8m_1a41bc7590967a458715869ae575e503ea" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>elseif</type>
        <definition>elseif isa</definition>
        <argsstring>(x_py, &apos;py.str&apos;) x_ml</argsstring>
        <name>isa</name>
        <param>
          <type>x_py</type>
        </param>
        <param>
          <type>&apos;py.str&apos;</type>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/root/cis_interface/cis_interface/cis_interface/interface/python2matlab.m" line="12" column="1"/>
      </memberdef>
      <memberdef kind="function" id="python2matlab_8m_1a156209628a2adc3ea776422a9968dd8b" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>elseif</type>
        <definition>elseif isa</definition>
        <argsstring>(x_py, &apos;py.bool&apos;) x_ml</argsstring>
        <name>isa</name>
        <param>
          <type>x_py</type>
        </param>
        <param>
          <type>&apos;py.bool&apos;</type>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/root/cis_interface/cis_interface/cis_interface/interface/python2matlab.m" line="14" column="1"/>
      </memberdef>
      <memberdef kind="function" id="python2matlab_8m_1af21d6a4d4fdd96db42b1ef2346b368c0" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>elseif</type>
        <definition>elseif isa</definition>
        <argsstring>(x_py, &apos;py.dict&apos;) % x_ml</argsstring>
        <name>isa</name>
        <param>
          <type>x_py</type>
        </param>
        <param>
          <type>&apos;py.dict&apos;</type>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/root/cis_interface/cis_interface/cis_interface/interface/python2matlab.m" line="16" column="1"/>
      </memberdef>
      <memberdef kind="function" id="python2matlab_8m_1a5e560191215eb517e44dea1ecde98c83" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type></type>
        <definition>elseif</definition>
        <argsstring>(isa(x_py, &apos;py.list&apos;)||isa(x_py, &apos;py.tuple&apos;)||isa(x_py, &apos;py.set&apos;)) x_ml</argsstring>
        <name>elseif</name>
        <param>
          <type>isa(x_py, &apos;py.list&apos;)||isa(x_py, &apos;py.tuple&apos;)||isa(x_py, &apos;py.set&apos;)</type>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/root/cis_interface/cis_interface/cis_interface/interface/python2matlab.m" line="21" column="1"/>
      </memberdef>
      <memberdef kind="function" id="python2matlab_8m_1a651b181bab45efb55157a0a46d759a78" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>elseif</type>
        <definition>elseif isa</definition>
        <argsstring>(x_py, &apos;py.numpy.ndarray&apos;) ndim</argsstring>
        <name>isa</name>
        <param>
          <type>x_py</type>
        </param>
        <param>
          <type>&apos;py.numpy.ndarray&apos;</type>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/root/cis_interface/cis_interface/cis_interface/interface/python2matlab.m" line="29" column="1"/>
      </memberdef>
      <memberdef kind="function" id="python2matlab_8m_1ab22a4d3e67e8d69769c38ff18231170a" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>if</type>
        <definition>if isa</definition>
        <argsstring>(x_py.dtype.names, &apos;py.tuple&apos;) is_struct</argsstring>
        <name>isa</name>
        <param>
          <type>x_py.dtype.</type>
          <declname>names</declname>
        </param>
        <param>
          <type>&apos;py.tuple&apos;</type>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/root/cis_interface/cis_interface/cis_interface/interface/python2matlab.m" line="33" column="1"/>
      </memberdef>
      <memberdef kind="function" id="python2matlab_8m_1aea4d1614e454bc8f6fd9a42363b1a82e" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type></type>
        <definition>if</definition>
        <argsstring>(nr *nc) &gt; 1 ndim</argsstring>
        <name>if</name>
        <param>
          <type>nr *</type>
          <declname>nc</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/root/cis_interface/cis_interface/cis_interface/interface/python2matlab.m" line="36" column="1"/>
      </memberdef>
      <memberdef kind="function" id="python2matlab_8m_1a3bc09156254dbd5d28d48b18f2efe521" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>elseif ndim</type>
        <definition>elseif ndim disp</definition>
        <argsstring>(&apos;Conversion of numpy arrays with ndim &gt; 2 uses nested cell arrays.&apos;)</argsstring>
        <name>disp</name>
        <param>
          <type>&apos;Conversion of numpy arrays with</type>
          <declname>ndim</declname>
        </param>
        <param>
          <type>2 uses nested cell arrays.&apos;</type>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/root/cis_interface/cis_interface/cis_interface/interface/python2matlab.m" line="45" column="1"/>
      </memberdef>
      <memberdef kind="function" id="python2matlab_8m_1a3eeaa707c140198f49c4bccf648be8e7" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>if ~is_struct if</type>
        <definition>if ~is_struct if ismember</definition>
        <argsstring>(char_code, [&apos;f&apos;, &apos;i&apos;]) x_ml</argsstring>
        <name>ismember</name>
        <param>
          <type>char_code</type>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/root/cis_interface/cis_interface/cis_interface/interface/python2matlab.m" line="48" column="1"/>
      </memberdef>
      <memberdef kind="function" id="python2matlab_8m_1a11f443524cb4b631207fd69087ac2c5f" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>else</type>
        <definition>else fprintf</definition>
        <argsstring>(&apos;Could not find Matlab type for code %s\n&apos;, char_code)</argsstring>
        <name>fprintf</name>
        <param>
          <type>&apos;Could not find Matlab type for code %s\n&apos;</type>
        </param>
        <param>
          <type>char_code</type>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/root/cis_interface/cis_interface/cis_interface/interface/python2matlab.m" line="56" column="1"/>
      </memberdef>
      <memberdef kind="function" id="python2matlab_8m_1a14192ca0324a4e26eaca17dd7d6d73c5" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type></type>
        <definition>elseif</definition>
        <argsstring>(isa(x_py, &apos;numeric&apos;)||isa(x_py, &apos;logical&apos;)) x_ml</argsstring>
        <name>elseif</name>
        <param>
          <type>isa(x_py, &apos;numeric&apos;)||isa(x_py, &apos;logical&apos;)</type>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/root/cis_interface/cis_interface/cis_interface/interface/python2matlab.m" line="59" column="1"/>
      </memberdef>
      <memberdef kind="function" id="python2matlab_8m_1ad12798cf477b7b74174260ba8ebc320b" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>else</type>
        <definition>else disp</definition>
        <argsstring>(&apos;Could not convert python type to matlab type.&apos;)</argsstring>
        <name>disp</name>
        <param>
          <type>&apos;Could not convert python type to matlab type.&apos;</type>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/root/cis_interface/cis_interface/cis_interface/interface/python2matlab.m" line="62" column="1"/>
      </memberdef>
      <memberdef kind="function" id="python2matlab_8m_1a93b469222970289e555304d64a33bf64" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type></type>
        <definition>disp</definition>
        <argsstring>(x_py)</argsstring>
        <name>disp</name>
        <param>
          <type>x_py</type>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/root/cis_interface/cis_interface/cis_interface/interface/python2matlab.m" line="63" column="1"/>
      </memberdef>
      <memberdef kind="function" id="python2matlab_8m_1a2b4a642dd0f34edd71bef7393ccae1e8" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type></type>
        <definition>disp</definition>
        <argsstring>(class(x_py))</argsstring>
        <name>disp</name>
        <param>
          <type>class(x_py)</type>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/root/cis_interface/cis_interface/cis_interface/interface/python2matlab.m" line="64" column="1"/>
      </memberdef>
      </sectiondef>
    <briefdescription>
    </briefdescription>
    <detaileddescription>
    </detaileddescription>
    <programlisting>
<codeline lineno="1"><highlight class="keyword">function</highlight><highlight class="normal"><sp/>x_ml<sp/>=<sp/>python2matlab(x_py)</highlight></codeline>
<codeline lineno="2"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>isa(x_py,<sp/></highlight><highlight class="stringliteral">&apos;py.float&apos;</highlight><highlight class="normal">)</highlight></codeline>
<codeline lineno="3"><highlight class="normal"><sp/><sp/><sp/><sp/>x_ml<sp/>=<sp/></highlight><highlight class="keywordtype">float</highlight><highlight class="normal">(x_py);</highlight></codeline>
<codeline lineno="4"><highlight class="normal"><sp/><sp/>elseif<sp/>isa(x_py,<sp/>&apos;py.</highlight><highlight class="keywordtype">double</highlight><highlight class="normal">&apos;)</highlight></codeline>
<codeline lineno="5"><highlight class="normal"><sp/><sp/><sp/><sp/>x_ml<sp/>=<sp/></highlight><highlight class="keywordtype">double</highlight><highlight class="normal">(x_py);</highlight></codeline>
<codeline lineno="6"><highlight class="normal"><sp/><sp/>elseif<sp/>isa(x_py,<sp/>&apos;py.</highlight><highlight class="keywordtype">int</highlight><highlight class="normal">&apos;)</highlight></codeline>
<codeline lineno="7"><highlight class="normal"><sp/><sp/><sp/><sp/>x_ml<sp/>=<sp/>int64(x_py);</highlight></codeline>
<codeline lineno="8"><highlight class="normal"><sp/><sp/>elseif<sp/>isa(x_py,<sp/>&apos;py.bytes&apos;)</highlight></codeline>
<codeline lineno="9"><highlight class="normal"><sp/><sp/><sp/><sp/>x_ml<sp/>=<sp/></highlight><highlight class="keywordtype">char</highlight><highlight class="normal">(x_py.decode(&apos;utf-8&apos;));</highlight></codeline>
<codeline lineno="10"><highlight class="normal"><sp/><sp/>elseif<sp/>isa(x_py,<sp/>&apos;py.</highlight><highlight class="keywordtype">string</highlight><highlight class="normal">&apos;)</highlight></codeline>
<codeline lineno="11"><highlight class="normal"><sp/><sp/><sp/><sp/>x_ml<sp/>=<sp/></highlight><highlight class="keywordtype">char</highlight><highlight class="normal">(x_py);</highlight></codeline>
<codeline lineno="12"><highlight class="normal"><sp/><sp/>elseif<sp/>isa(x_py,<sp/>&apos;py.str&apos;)</highlight></codeline>
<codeline lineno="13"><highlight class="normal"><sp/><sp/><sp/><sp/>x_ml<sp/>=<sp/></highlight><highlight class="keywordtype">char</highlight><highlight class="normal">(x_py);</highlight></codeline>
<codeline lineno="14"><highlight class="normal"><sp/><sp/>elseif<sp/>isa(x_py,<sp/>&apos;py.</highlight><highlight class="keywordtype">bool</highlight><highlight class="normal">&apos;)</highlight></codeline>
<codeline lineno="15"><highlight class="normal"><sp/><sp/><sp/><sp/>x_ml<sp/>=<sp/>logical(x_py);</highlight></codeline>
<codeline lineno="16"><highlight class="normal"><sp/><sp/>elseif<sp/>isa(x_py,<sp/>&apos;py.dict&apos;)</highlight></codeline>
<codeline lineno="17"><highlight class="normal"><sp/><sp/><sp/><sp/>%<sp/>x_ml<sp/>=<sp/>struct(x_py);</highlight></codeline>
<codeline lineno="18"><highlight class="normal"><sp/><sp/><sp/><sp/>dict_keys<sp/>=<sp/>python2matlab(py.list(keys(x_py)));</highlight></codeline>
<codeline lineno="19"><highlight class="normal"><sp/><sp/><sp/><sp/>dict_vals<sp/>=<sp/>python2matlab(py.list(values(x_py)));</highlight></codeline>
<codeline lineno="20"><highlight class="normal"><sp/><sp/><sp/><sp/>x_ml<sp/>=<sp/>containers.Map(dict_keys,<sp/>dict_vals);</highlight></codeline>
<codeline lineno="21"><highlight class="normal"><sp/><sp/>elseif<sp/>(isa(x_py,<sp/>&apos;py.list&apos;)<sp/>||<sp/>isa(x_py,<sp/>&apos;py.tuple&apos;)<sp/>||<sp/>isa(x_py,<sp/>&apos;py.set&apos;))</highlight></codeline>
<codeline lineno="22"><highlight class="normal"><sp/><sp/><sp/><sp/>x_ml<sp/>=<sp/>cell(x_py);</highlight></codeline>
<codeline lineno="23"><highlight class="normal"><sp/><sp/><sp/><sp/>[nr,<sp/>nc]<sp/>=<sp/>size(x_ml);</highlight></codeline>
<codeline lineno="24"><highlight class="normal"><sp/><sp/><sp/><sp/>for<sp/>i<sp/>=<sp/>1:nr</highlight></codeline>
<codeline lineno="25"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>for<sp/>j<sp/>=<sp/>1:nc</highlight></codeline>
<codeline lineno="26"><highlight class="normal"><sp/><sp/><sp/><sp/>x_ml{i,<sp/>j}<sp/>=<sp/>python2matlab(x_ml{i,<sp/>j});</highlight></codeline>
<codeline lineno="27"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>end;</highlight></codeline>
<codeline lineno="28"><highlight class="normal"><sp/><sp/><sp/><sp/>end;</highlight></codeline>
<codeline lineno="29"><highlight class="normal"><sp/><sp/>elseif<sp/>isa(x_py,<sp/></highlight><highlight class="stringliteral">&apos;py.numpy.ndarray&apos;</highlight><highlight class="normal">)</highlight></codeline>
<codeline lineno="30"><highlight class="normal"><sp/><sp/><sp/><sp/>ndim<sp/>=<sp/>x_py.ndim;</highlight></codeline>
<codeline lineno="31"><highlight class="normal"><sp/><sp/><sp/><sp/>char_code<sp/>=<sp/></highlight><highlight class="keywordtype">char</highlight><highlight class="normal">(x_py.dtype.kind);</highlight></codeline>
<codeline lineno="32"><highlight class="normal"><sp/><sp/><sp/><sp/>is_struct<sp/>=<sp/>false;</highlight></codeline>
<codeline lineno="33"><highlight class="normal"><sp/><sp/><sp/><sp/>if<sp/>isa(x_py.dtype.names,<sp/>&apos;py.tuple&apos;)</highlight></codeline>
<codeline lineno="34"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>is_struct<sp/>=<sp/>true;</highlight></codeline>
<codeline lineno="35"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>[nr,<sp/>nc]<sp/>=<sp/>x_py.dtype.names.size;</highlight></codeline>
<codeline lineno="36"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>if<sp/>(nr<sp/>*<sp/>nc)<sp/>&gt;<sp/>1</highlight></codeline>
<codeline lineno="37"><highlight class="normal"><sp/><sp/><sp/><sp/>ndim<sp/>=<sp/>ndim<sp/>+<sp/>1;</highlight></codeline>
<codeline lineno="38"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>end;</highlight></codeline>
<codeline lineno="39"><highlight class="normal"><sp/><sp/><sp/><sp/>end;</highlight></codeline>
<codeline lineno="40"><highlight class="normal"><sp/><sp/><sp/><sp/>x_ml<sp/>=<sp/>python2matlab(x_py.tolist());</highlight></codeline>
<codeline lineno="41"><highlight class="normal"><sp/><sp/><sp/><sp/>if<sp/>ndim<sp/>==<sp/>2</highlight></codeline>
<codeline lineno="42"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>x_ml<sp/>=<sp/>transpose(x_ml);</highlight></codeline>
<codeline lineno="43"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>x_ml<sp/>=<sp/>vertcat(x_ml{:});</highlight></codeline>
<codeline lineno="44"><highlight class="normal"><sp/><sp/><sp/><sp/>elseif<sp/>ndim<sp/>&gt;<sp/>2</highlight></codeline>
<codeline lineno="45"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>disp(</highlight><highlight class="stringliteral">&apos;Conversion<sp/>of<sp/>numpy<sp/>arrays<sp/>with<sp/>ndim<sp/>&gt;<sp/>2<sp/>uses<sp/>nested<sp/>cell<sp/>arrays.&apos;</highlight><highlight class="normal">);</highlight></codeline>
<codeline lineno="46"><highlight class="normal"><sp/><sp/><sp/><sp/>end;</highlight></codeline>
<codeline lineno="47"><highlight class="normal"><sp/><sp/><sp/><sp/>%<sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>~is_struct</highlight></codeline>
<codeline lineno="48"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>ismember(char_code,<sp/>[</highlight><highlight class="charliteral">&apos;f&apos;</highlight><highlight class="normal">,<sp/></highlight><highlight class="charliteral">&apos;i&apos;</highlight><highlight class="normal">])</highlight></codeline>
<codeline lineno="49"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>x_ml<sp/>=<sp/>cell2mat(x_ml);</highlight></codeline>
<codeline lineno="50"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>%<sp/>x_ml<sp/>=<sp/>py.array.array(char_code,<sp/>x_py.tolist());</highlight></codeline>
<codeline lineno="51"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>%<sp/>if<sp/>char_code<sp/>==<sp/>&apos;f&apos;</highlight></codeline>
<codeline lineno="52"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>%<sp/><sp/><sp/>x_ml<sp/>=<sp/></highlight><highlight class="keywordtype">double</highlight><highlight class="normal">(x_ml);</highlight></codeline>
<codeline lineno="53"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>%<sp/>elseif<sp/>char_code<sp/>==<sp/>&apos;i&apos;</highlight></codeline>
<codeline lineno="54"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>%<sp/><sp/><sp/>x_ml<sp/>=<sp/>int64(x_ml);</highlight></codeline>
<codeline lineno="55"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>%<sp/>else</highlight></codeline>
<codeline lineno="56"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>%<sp/><sp/><sp/>fprintf(&apos;Could<sp/>not<sp/>find<sp/>Matlab<sp/>type<sp/>for<sp/>code<sp/>%s\n&apos;,<sp/>char_code);</highlight></codeline>
<codeline lineno="57"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>%<sp/>end;</highlight></codeline>
<codeline lineno="58"><highlight class="normal"><sp/><sp/><sp/><sp/>end;</highlight></codeline>
<codeline lineno="59"><highlight class="normal"><sp/><sp/>elseif<sp/>(isa(x_py,<sp/>&apos;numeric&apos;)<sp/>||<sp/>isa(x_py,<sp/>&apos;logical&apos;))</highlight></codeline>
<codeline lineno="60"><highlight class="normal"><sp/><sp/><sp/><sp/>x_ml<sp/>=<sp/>x_py;</highlight></codeline>
<codeline lineno="61"><highlight class="normal"><sp/><sp/>else</highlight></codeline>
<codeline lineno="62"><highlight class="normal"><sp/><sp/><sp/><sp/>disp(&apos;Could<sp/>not<sp/>convert<sp/>python<sp/>type<sp/>to<sp/>matlab<sp/>type.&apos;);</highlight></codeline>
<codeline lineno="63"><highlight class="normal"><sp/><sp/><sp/><sp/>disp(x_py);</highlight></codeline>
<codeline lineno="64"><highlight class="normal"><sp/><sp/><sp/><sp/>disp(class(x_py));</highlight></codeline>
<codeline lineno="65"><highlight class="normal"><sp/><sp/><sp/><sp/>x_ml<sp/>=<sp/>x_py;</highlight></codeline>
<codeline lineno="66"><highlight class="normal"><sp/><sp/>end;</highlight></codeline>
<codeline lineno="67"><highlight class="normal">end</highlight></codeline>
    </programlisting>
    <location file="/root/cis_interface/cis_interface/cis_interface/interface/python2matlab.m"/>
  </compounddef>
</doxygen>
