Skip to content

Commit fa580dd

Browse files
authored
Adjust lookup function to use Int indices (#63)
Refactor the type signature of the lookup function to clarify input parameters.
1 parent 6e3c23a commit fa580dd

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

src/ArrayFire/Index.hs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,14 @@ index (Array fptr) seqs =
4141
n = fromIntegral (length seqs)
4242

4343
-- | Lookup an Array by keys along a specified dimension
44-
lookup :: Array a -> Array a -> Int -> Array a
44+
lookup
45+
:: Array a
46+
-- ^ Input Array
47+
-> Array Int
48+
-- ^ Indices
49+
-> Int
50+
-- ^ Dimension
51+
-> Array a
4552
lookup a b n = op2 a b $ \p x y -> af_lookup p x y (fromIntegral n)
4653

4754
-- | A special value representing the entire axis of an 'Array'.

0 commit comments

Comments
 (0)