Custom Query (35 matches)

Filters
 
Or
 
  
 
Columns

Show under each result:


Results (31 - 33 of 35)

1 2 3 4 5 6 7 8 9 10 11 12
Ticket
#20
Description

From SO: Hello! I'm a bit confused with select function in repa package:

select (\i -> True) (\i -> i) 10 gives the result

[0,1,2,3,4,5,6,7,8]

I thought i to be between 0 and 10 or 0 and 9. Why is it between 0 and 8?

Getting indices from [0..8] for an extend of 10 is confusing.

#21
Description

A few people have asked how to take sub-matrices. This is an index transformation that's easy to specify, but there should be a nice wrapper for it. We could make a shape polymorphic version using addIndex to add the starting offset.

let arr = fromList (Z :. (5 :: Int)) [1, 2, 3, 4, 5 :: Int] 
in  fromFunction (Z :. 3) (\(Z :. ix) -> arr ! (Z :. ix + 1))
#27
Description

If we don't then we'll hammer the inRange function for the result of stencil computations, which will be slow.

1 2 3 4 5 6 7 8 9 10 11 12
Note: See TracQuery for help on using queries.