From c832bb3ac428a0d96759d9c82e9547d3acf4353d Mon Sep 17 00:00:00 2001 From: Michael Orlitzky Date: Wed, 7 Sep 2011 01:26:41 -0400 Subject: [PATCH] Use unsafe versions of index and traverse. --- src/Grid.hs | 2 +- src/Values.hs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Grid.hs b/src/Grid.hs index fcdeb5e..01d73a2 100644 --- a/src/Grid.hs +++ b/src/Grid.hs @@ -156,7 +156,7 @@ zoom :: Grid -> ScaleFactor -> Values3D zoom g scale_factor | xsize == 0 || ysize == 0 || zsize == 0 = empty3d | otherwise = - R.force $ R.traverse arr transExtent (zoom_lookup g scale_factor) + R.force $ R.unsafeTraverse arr transExtent (zoom_lookup g scale_factor) where arr = function_values g (xsize, ysize, zsize) = dims arr diff --git a/src/Values.hs b/src/Values.hs index 8e2b61e..070abbb 100644 --- a/src/Values.hs +++ b/src/Values.hs @@ -12,7 +12,7 @@ import Data.Array.Repa ( DIM3, extent, fromList, - index, + unsafeIndex, reshape, size ) @@ -72,7 +72,7 @@ dims v3d = idx :: Values3D -> Int -> Int -> Int -> Double idx v3d i j k = - index v3d shape + unsafeIndex v3d shape where shape :: DIM3 shape = (Z :. i :. j :. k) -- 2.43.2