diff options
Diffstat (limited to 'lib/Data/Packed/Internal/Matrix.hs')
-rw-r--r-- | lib/Data/Packed/Internal/Matrix.hs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Data/Packed/Internal/Matrix.hs b/lib/Data/Packed/Internal/Matrix.hs index 861c72a..100b8ea 100644 --- a/lib/Data/Packed/Internal/Matrix.hs +++ b/lib/Data/Packed/Internal/Matrix.hs | |||
@@ -391,11 +391,11 @@ conjV :: (Storable a, RealFloat a) => Vector (Complex a) -> Vector (Complex a) | |||
391 | conjV = mapVector conjugate | 391 | conjV = mapVector conjugate |
392 | 392 | ||
393 | -- | creates a complex vector from vectors with real and imaginary parts | 393 | -- | creates a complex vector from vectors with real and imaginary parts |
394 | toComplexV :: Element a => (Vector a, Vector a) -> Vector (Complex a) | 394 | toComplexV :: (RealFloat a, Element a) => (Vector a, Vector a) -> Vector (Complex a) |
395 | toComplexV (r,i) = asComplex $ flatten $ fromColumns [r,i] | 395 | toComplexV (r,i) = asComplex $ flatten $ fromColumns [r,i] |
396 | 396 | ||
397 | -- | the inverse of 'toComplex' | 397 | -- | the inverse of 'toComplex' |
398 | fromComplexV :: Element a => Vector (Complex a) -> (Vector a, Vector a) | 398 | fromComplexV :: (RealFloat a, Element a) => Vector (Complex a) -> (Vector a, Vector a) |
399 | fromComplexV z = (r,i) where | 399 | fromComplexV z = (r,i) where |
400 | [r,i] = toColumns $ reshape 2 $ asReal z | 400 | [r,i] = toColumns $ reshape 2 $ asReal z |
401 | 401 | ||