      (i.core/matrix (map second inp))]))
 
 (defn rand-matrix
-  [r c]
-  (i.core/matrix (repeatedly r (partial m.rnd/sample-normal c))))
+  [num-rows num-cols]
+  (i.core/matrix (repeatedly num-rows (partial m.rnd/sample-normal num-cols))))
 
 (defn one-matrix
-  [r c]
-  (i.core/matrix (repeatedly r (constantly 1))))
+  [num-rows num-cols]
+  (m/add (m/zero-matrix num-rows num-cols) 1))
 
 (defn matrices
   [^Matrix matrix]

(ns conj-2016.core
  (:require [clojure.java.io :as io]
            [clojure.string :as string]
            [incanter.core :as i.core]
            [clojure.core.matrix :as m]
            [clojure.core.matrix.random :as m.rnd])
  (:import [java.util.zip GZIPInputStream]
           [mikera.matrixx Matrix]))


  ;88             (H, thisP) = Hbeta(Di, beta[i]);
  ;89             Hdiff = H - logU;
  ;90             tries = tries + 1;
  (loop [d-i nil
         h-diff h-diff
         this-p (i.core/matrix [] [])
         tries 0]
    ;71         while Math.abs(Hdiff) > tol and tries < 50:
