<p>Some food for thought: numpy has these things called "masked arrays" (<a href="http://docs.scipy.org/doc/numpy/reference/maskedarray.html">http://docs.scipy.org/doc/numpy/reference/maskedarray.html</a>). While the actual implementation in numpy is pretty buggy, I think the idea has merit. I think the masked array is really the abstraction we're looking for here. </p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">&mdash;<br>Reply to this email directly or <a href="https://github.com/mlpack/mlpack/pull/376#issuecomment-69621535">view it on GitHub</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/AJ4bFPNKv4Kd6nWk-_ohhVNc40fKD21dks5nhA1ggaJpZM4DQ8wr.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/376#issuecomment-69621535"></link>
    <meta itemprop="name" content="View Pull Request"></meta>
  </div>
  <meta itemprop="description" content="View this Pull Request on GitHub"></meta>
</div>