You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mahout.apache.org by "Till Rohrmann (JIRA)" <ji...@apache.org> on 2014/02/11 12:58:20 UTC

[jira] [Created] (MAHOUT-1415) Clone method on sparse matrices fails if there is an empty row which has not been set explicitly

Till Rohrmann created MAHOUT-1415:
-------------------------------------

             Summary: Clone method on sparse matrices fails if there is an empty row which has not been set explicitly
                 Key: MAHOUT-1415
                 URL: https://issues.apache.org/jira/browse/MAHOUT-1415
             Project: Mahout
          Issue Type: Bug
          Components: Math
    Affects Versions: 1.0
         Environment: Mac OS X Mavericks, Darwin Kernel Version 13.0.2
            Reporter: Till Rohrmann
            Priority: Minor
             Fix For: 1.0


The clone method of the SparseMatrix class fails with a NullPointerException if there exists an empty row in the matrix which has not been explicitly set. The reason for this problem is that the clone operation iterates over all rows and clones them whether there exists a Vector instance for this row or not. The problem should be easily fixed by iterating only over the existing matrix slices.



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

Re: [jira] [Created] (MAHOUT-1415) Clone method on sparse matrices fails if there is an empty row which has not been set explicitly

Posted by Sebastian Schelter <ss...@apache.org>.
Cool find, Till. Can you provide a patch?

On 02/11/2014 12:58 PM, Till Rohrmann (JIRA) wrote:
> Till Rohrmann created MAHOUT-1415:
> -------------------------------------
>
>               Summary: Clone method on sparse matrices fails if there is an empty row which has not been set explicitly
>                   Key: MAHOUT-1415
>                   URL: https://issues.apache.org/jira/browse/MAHOUT-1415
>               Project: Mahout
>            Issue Type: Bug
>            Components: Math
>      Affects Versions: 1.0
>           Environment: Mac OS X Mavericks, Darwin Kernel Version 13.0.2
>              Reporter: Till Rohrmann
>              Priority: Minor
>               Fix For: 1.0
>
>
> The clone method of the SparseMatrix class fails with a NullPointerException if there exists an empty row in the matrix which has not been explicitly set. The reason for this problem is that the clone operation iterates over all rows and clones them whether there exists a Vector instance for this row or not. The problem should be easily fixed by iterating only over the existing matrix slices.
>
>
>
> --
> This message was sent by Atlassian JIRA
> (v6.1.5#6160)
>