Merge branch 'features/pca_jaxb_datasetrefs_JAL-3171_JAL-3063_JAL-1767' into develop
[jalview.git] / src / jalview / math / SparseMatrix.java
index 86592a0..e24cda5 100644 (file)
@@ -45,11 +45,8 @@ public class SparseMatrix extends Matrix
    */
   public SparseMatrix(double[][] v)
   {
-    rows = v.length;
-    if (rows > 0)
-    {
-      cols = v[0].length;
-    }
+    super(v.length, v.length > 0 ? v[0].length : 0);
+
     sparseColumns = new SparseDoubleArray[cols];
 
     /*