Safe Haskell | None |
---|

- reshape :: (Shape sh1, Shape sh2, Source r1 e) => sh2 -> Array r1 sh1 e -> Array D sh2 e
- append :: (Shape sh, Source r1 e, Source r2 e) => Array r1 (sh :. Int) e -> Array r2 (sh :. Int) e -> Array D (sh :. Int) e
- (++) :: (Shape sh, Source r1 e, Source r2 e) => Array r1 (sh :. Int) e -> Array r2 (sh :. Int) e -> Array D (sh :. Int) e
- transpose :: (Shape sh, Source r e) => Array r ((sh :. Int) :. Int) e -> Array D ((sh :. Int) :. Int) e
- extract :: (Shape sh, Source r e) => sh -> sh -> Array r sh e -> Array D sh e
- backpermute :: forall r sh1 sh2 e. (Shape sh1, Shape sh2, Source r e) => sh2 -> (sh2 -> sh1) -> Array r sh1 e -> Array D sh2 e
- unsafeBackpermute :: forall r sh1 sh2 e. (Shape sh1, Shape sh2, Source r e) => sh2 -> (sh2 -> sh1) -> Array r sh1 e -> Array D sh2 e
- backpermuteDft :: forall r1 r2 sh1 sh2 e. (Shape sh1, Shape sh2, Source r1 e, Source r2 e) => Array r2 sh2 e -> (sh2 -> Maybe sh1) -> Array r1 sh1 e -> Array D sh2 e
- unsafeBackpermuteDft :: forall r1 r2 sh1 sh2 e. (Shape sh1, Shape sh2, Source r1 e, Source r2 e) => Array r2 sh2 e -> (sh2 -> Maybe sh1) -> Array r1 sh1 e -> Array D sh2 e
- extend :: (Slice sl, Shape (SliceShape sl), Shape (FullShape sl), Source r e) => sl -> Array r (SliceShape sl) e -> Array D (FullShape sl) e
- unsafeExtend :: (Slice sl, Shape (SliceShape sl), Shape (FullShape sl), Source r e) => sl -> Array r (SliceShape sl) e -> Array D (FullShape sl) e
- slice :: (Slice sl, Shape (FullShape sl), Shape (SliceShape sl), Source r e) => Array r (FullShape sl) e -> sl -> Array D (SliceShape sl) e
- unsafeSlice :: (Slice sl, Shape (FullShape sl), Shape (SliceShape sl), Source r e) => Array r (FullShape sl) e -> sl -> Array D (SliceShape sl) e

# Documentation

reshape :: (Shape sh1, Shape sh2, Source r1 e) => sh2 -> Array r1 sh1 e -> Array D sh2 eSource

Impose a new shape on the elements of an array.
The new extent must be the same size as the original, else `error`

.

append :: (Shape sh, Source r1 e, Source r2 e) => Array r1 (sh :. Int) e -> Array r2 (sh :. Int) e -> Array D (sh :. Int) eSource

Append two arrays.

(++) :: (Shape sh, Source r1 e, Source r2 e) => Array r1 (sh :. Int) e -> Array r2 (sh :. Int) e -> Array D (sh :. Int) eSource

Append two arrays.

transpose :: (Shape sh, Source r e) => Array r ((sh :. Int) :. Int) e -> Array D ((sh :. Int) :. Int) eSource

Transpose the lowest two dimensions of an array. Transposing an array twice yields the original.

Extract a sub-range of elements from an array.

:: forall r sh1 sh2 e . (Shape sh1, Shape sh2, Source r e) | |

=> sh2 | Extent of result array. |

-> (sh2 -> sh1) | Function mapping each index in the result array to an index of the source array. |

-> Array r sh1 e | Source array. |

-> Array D sh2 e |

Backwards permutation of an array's elements. The result array has the same extent as the original.

:: forall r sh1 sh2 e . (Shape sh1, Shape sh2, Source r e) | |

=> sh2 | Extent of result array. |

-> (sh2 -> sh1) | Function mapping each index in the result array to an index of the source array. |

-> Array r sh1 e | Source array. |

-> Array D sh2 e |

Backwards permutation of an array's elements. The result array has the same extent as the original.

:: forall r1 r2 sh1 sh2 e . (Shape sh1, Shape sh2, Source r1 e, Source r2 e) | |

=> Array r2 sh2 e | Default values ( |

-> (sh2 -> Maybe sh1) | Function mapping each index in the result array to an index in the source array. |

-> Array r1 sh1 e | Source array. |

-> Array D sh2 e |

Default backwards permutation of an array's elements.
If the function returns `Nothing`

then the value at that index is taken
from the default array (`arrDft`

)

:: forall r1 r2 sh1 sh2 e . (Shape sh1, Shape sh2, Source r1 e, Source r2 e) | |

=> Array r2 sh2 e | Default values ( |

-> (sh2 -> Maybe sh1) | Function mapping each index in the result array to an index in the source array. |

-> Array r1 sh1 e | Source array. |

-> Array D sh2 e |

Default backwards permutation of an array's elements.
If the function returns `Nothing`

then the value at that index is taken
from the default array (`arrDft`

)

extend :: (Slice sl, Shape (SliceShape sl), Shape (FullShape sl), Source r e) => sl -> Array r (SliceShape sl) e -> Array D (FullShape sl) eSource

Extend an array, according to a given slice specification.

For example, to replicate the rows of an array use the following:

extend arr (Any :. (5::Int) :. All)

unsafeExtend :: (Slice sl, Shape (SliceShape sl), Shape (FullShape sl), Source r e) => sl -> Array r (SliceShape sl) e -> Array D (FullShape sl) eSource

Extend an array, according to a given slice specification.

For example, to replicate the rows of an array use the following:

extend arr (Any :. (5::Int) :. All)

slice :: (Slice sl, Shape (FullShape sl), Shape (SliceShape sl), Source r e) => Array r (FullShape sl) e -> sl -> Array D (SliceShape sl) eSource

Take a slice from an array, according to a given specification.

For example, to take a row from a matrix use the following:

slice arr (Any :. (5::Int) :. All)

To take a column use:

slice arr (Any :. (5::Int))

unsafeSlice :: (Slice sl, Shape (FullShape sl), Shape (SliceShape sl), Source r e) => Array r (FullShape sl) e -> sl -> Array D (SliceShape sl) eSource

Take a slice from an array, according to a given specification.

For example, to take a row from a matrix use the following:

slice arr (Any :. (5::Int) :. All)

To take a column use:

slice arr (Any :. (5::Int))