Changes between Version 29 and Version 30 of WikiStart


Ignore:
Timestamp:
Jun 10, 2011, 2:46:44 AM (13 years ago)
Author:
Ben Lippmeier
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • WikiStart

    v29 v30  
    2929
    3030Q: How to I map a function across all slices in an array? [[br]]
    31 A: This is not possible in general because we can't guarantee that the worker function will return a slice with the same shape as the original. If the slices only contain a few elements (up to six) then your best bet is to use an array of tuples and use the regular `map` function to apply the worker to all the tuples. This approach is limited to 6-tuples because that's the maximum the `Data.Vector` library currently supports, and `Repa` uses `Data.Vector` to store manifest arrays. See `http://repa.ouroborus.net/ticket/22` for discussion.
     31A: This is not possible in general because we can't guarantee that the worker function will return a slice with the same shape as the original. If the slices only contain a few elements (up to six) then your best bet is to use an array of tuples and use the regular `map` function to apply the worker to all the tuples. This approach is limited to 6-tuples because that's the maximum the `Data.Vector` library currently supports, and `Repa` uses `Data.Vector` to store manifest arrays. See #22 for discussion.
    3232
    3333Q: Where do I ask further questions? [[br]]