-- Linear Algebra -------------------------------------------------------------

-- | Scale sparse vector by a scalar a * v
scale :: forall n a. (Eq a, Num a, DIM n) => a -> SparseVector n a -> SparseVector n a
scale 0 v = empty
scale :: forall n a. (Eq a, Num a, DIM n) => a -> SparseVector n a -> SparseVector n a
scale 0 v = empty
scale 0 v = empty