<p>In <a href="https://github.com/mlpack/mlpack/pull/696#discussion_r67187858">src/mlpack/tests/edge_boxes_test.cpp</a>:</p>
<pre style='color:#555'>&gt; +/**
&gt; + * This test checks the feature extraction functions 
&gt; + * mentioned in feature_extraction.hpp
&gt; + */
&gt; +
&gt; +void Test(arma::mat m1, arma::mat m2)
&gt; +{
&gt; +  for (size_t i = 0; i &lt; m1.n_cols; ++i)
&gt; +    BOOST_REQUIRE_CLOSE(m1(i), m2(i), 1e-2);  
&gt; +}
&gt; +
&gt; +void Test(arma::cube m1, arma::cube m2)
&gt; +{
&gt; +  for (size_t i = 0; i &lt; m1.n_cols; ++i)
&gt; +    BOOST_REQUIRE_CLOSE(m1(i), m2(i), 1e-2);  
&gt; +}
</pre>
<p>That only compares the first (<code>n_cols</code>) elements. I think you like to use <code>n_elem</code>. Also you could use a template parameter for the mat type and just write a single function for cube and mat.</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">&mdash;<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/mlpack/mlpack/pull/696/files/b38b688edfc4c2ee8bf461240f8384a70575d3a4#r67187858">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe/AJ4bFK4ahJe5iYUXobl5PuGYvGOxjFt9ks5qMB38gaJpZM4I1lnr">mute the thread</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/AJ4bFMDJVA4RQ1yDSpJoa5AQHfn2155Cks5qMB38gaJpZM4I1lnr.gif" width="1" /></p>
<div itemscope itemtype="http://schema.org/EmailMessage">
<div itemprop="action" itemscope itemtype="http://schema.org/ViewAction">
  <link itemprop="url" href="https://github.com/mlpack/mlpack/pull/696/files/b38b688edfc4c2ee8bf461240f8384a70575d3a4#r67187858"></link>
  <meta itemprop="name" content="View Pull Request"></meta>
</div>
<meta itemprop="description" content="View this Pull Request on GitHub"></meta>
</div>