From d430937c569bedf188ce876487879fb14352d21e Mon Sep 17 00:00:00 2001 From: Simon Brooke Date: Mon, 24 Jun 2019 12:25:16 +0100 Subject: [PATCH] Fix a regression! --- src/sparse_array/core.clj | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/sparse_array/core.clj b/src/sparse_array/core.clj index db7d804..b169df8 100644 --- a/src/sparse_array/core.clj +++ b/src/sparse_array/core.clj @@ -95,7 +95,10 @@ (vector? x) (if (every? vector? x) - (inc (apply max (map dense-dimensions x))) + (inc (apply min (map dense-dimensions x))) + ;; `min` is right here, not `max`, because otherwise + ;; we will get malformed arrays. Be liberal with what you + ;; consume, conservative with what you return! 1) 0))