From 9a17969ad0ea9f940db6201a37b9aed19ad605df Mon Sep 17 00:00:00 2001 From: Alberto Ruiz Date: Tue, 3 Jun 2014 21:06:17 +0200 Subject: fix linspace, expose udot, complex static, wip --- packages/base/src/Data/Packed/Numeric.hs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'packages/base/src/Data/Packed') diff --git a/packages/base/src/Data/Packed/Numeric.hs b/packages/base/src/Data/Packed/Numeric.hs index e324ab6..e90c612 100644 --- a/packages/base/src/Data/Packed/Numeric.hs +++ b/packages/base/src/Data/Packed/Numeric.hs @@ -90,7 +90,8 @@ Logarithmic spacing can be defined as follows: @logspace n (a,b) = 10 ** linspace n (a,b)@ -} linspace :: (Container Vector e) => Int -> (e, e) -> Vector e -linspace 0 (a,b) = fromList[(a+b)/2] +linspace 0 _ = fromList[] +linspace 1 (a,b) = fromList[(a+b)/2] linspace n (a,b) = addConstant a $ scale s $ fromList $ map fromIntegral [0 .. n-1] where s = (b-a)/fromIntegral (n-1) -- cgit v1.2.3