summaryrefslogtreecommitdiff
path: root/packages/base/src/Data/Packed
diff options
context:
space:
mode:
Diffstat (limited to 'packages/base/src/Data/Packed')
-rw-r--r--packages/base/src/Data/Packed/Numeric.hs6
1 files changed, 5 insertions, 1 deletions
diff --git a/packages/base/src/Data/Packed/Numeric.hs b/packages/base/src/Data/Packed/Numeric.hs
index 80f1718..7d77b19 100644
--- a/packages/base/src/Data/Packed/Numeric.hs
+++ b/packages/base/src/Data/Packed/Numeric.hs
@@ -68,6 +68,7 @@ module Data.Packed.Numeric (
68) where 68) where
69 69
70import Data.Packed 70import Data.Packed
71import Data.Packed.Internal(conformMs)
71import Data.Packed.Internal.Numeric 72import Data.Packed.Internal.Numeric
72import Data.Complex 73import Data.Complex
73import Numeric.LinearAlgebra.Algorithms(Field,linearSolveSVD) 74import Numeric.LinearAlgebra.Algorithms(Field,linearSolveSVD)
@@ -318,6 +319,9 @@ cselect = cselect'
318remap :: Element t => Matrix I -> Matrix I -> Matrix t -> Matrix t 319remap :: Element t => Matrix I -> Matrix I -> Matrix t -> Matrix t
319remap i j m 320remap i j m
320 | minElement i >= 0 && maxElement i < fromIntegral (rows m) && 321 | minElement i >= 0 && maxElement i < fromIntegral (rows m) &&
321 minElement j >= 0 && maxElement j < fromIntegral (cols m) = remapM i j m 322 minElement j >= 0 && maxElement j < fromIntegral (cols m) = remapM i' j' m
322 | otherwise = error $ "out of range index in rmap" 323 | otherwise = error $ "out of range index in rmap"
324 where
325 [i',j'] = conformMs [i,j]
326
323 327