All tests pass again, with much more safety.
This commit is contained in:
parent
9d2b6da1cc
commit
dfd5728e57
2 changed files with 36 additions and 5 deletions
|
|
@ -32,17 +32,18 @@
|
|||
([x & axes]
|
||||
(and
|
||||
(map? x)
|
||||
(number? (:dimensions x))
|
||||
(pos? (:dimensions x))
|
||||
(keyword? (:coord x))
|
||||
(= (:coord x) (first axes))
|
||||
(if
|
||||
(rest axes)
|
||||
(empty? (rest axes))
|
||||
(= (:content x) :data)
|
||||
(and
|
||||
(= (:content x) (rest axes))
|
||||
(every?
|
||||
sparse-array?
|
||||
(map #(x %) (filter integer? (keys x)))))
|
||||
(= (:content x) :data)))))
|
||||
(map #(x %) (filter integer? (keys x)))))))))
|
||||
|
||||
(defn put
|
||||
"Return a sparse array like this `array` but with this `value` at these
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue