 
 (defn add-padding
   "Adds specified value padding to 2d matrices"
-  [mat dim n & [value]]
+  [mat ^Integer dim ^Integer n & [value]]
   (let [other-dim (mod (inc dim) 2)
         other-dimcount (cm/dimension-count mat other-dim)]
     (case dim

  (rownames [this] "Vector of row names, in order")
  (colnames [this] "Vector of column names, in order")
  (get-matrix [this] "Extract the matrix object")
  (rowname-subset [this names] "Get a new PNamedMatrix subsetting to just the given rownames"))

;(defn- padding-dimcounts

  are in nmat, it just subsets to the rownames that are. Should scrap other one?"
  (let [safe-names (filter
                     ; XXX This is kinda bad; should only be using protocol
                     (partial index (get-row-index nmat))
                     names)]
    (rowname-subset nmat names)))

(defn get-row-by-name [nmat row-name]
  ; XXX This is kinda bad; should only be using protocol
  (cm/get-row (get-matrix nmat) (index (get-row-index nmat) row-name)))

(defn inv-rowname-subset [nmat row-names]
  "Returns named matrix which has been subset to all the rows not in row-names"
