procedure
( array-transform arrdsproc)→(Array A)
ds:In-Indexes
- : #(struct:Array
(Indexes Index (Boxof Boolean) (-> Void) (-> Indexes (U 'three Byte)))
#<syntax:build/user/8.18/pkgs/math-lib/math/private/array/typed-array-struct.rkt:56:13 prop:equal+hash>
#<syntax:build/user/8.18/pkgs/math-lib/math/private/array/typed-array-struct.rkt:55:13 prop:custom-write>
#<syntax:build/user/8.18/pkgs/math-lib/math/private/array/typed-array-struct.rkt:54:13 prop:custom-print-quotable>)
(array
#[#['three 'three 'three]
#['three 'three 'three]
#['three 'three 'three]])
> arr- : #(struct:Array
(Indexes Index (Boxof Boolean) (-> Void) (-> Indexes Index))
#<syntax:build/user/8.18/pkgs/math-lib/math/private/array/typed-array-struct.rkt:56:13 prop:equal+hash>
#<syntax:build/user/8.18/pkgs/math-lib/math/private/array/typed-array-struct.rkt:55:13 prop:custom-write>
#<syntax:build/user/8.18/pkgs/math-lib/math/private/array/typed-array-struct.rkt:54:13 prop:custom-print-quotable>)
(array #[#[0 1 2] #[3 4 5] #[6 7 8]])
arr- : #(struct:Array
(Indexes Index (Boxof Boolean) (-> Void) (-> Indexes Index))
#<syntax:build/user/8.18/pkgs/math-lib/math/private/array/typed-array-struct.rkt:56:13 prop:equal+hash>
#<syntax:build/user/8.18/pkgs/math-lib/math/private/array/typed-array-struct.rkt:55:13 prop:custom-write>
#<syntax:build/user/8.18/pkgs/math-lib/math/private/array/typed-array-struct.rkt:54:13 prop:custom-print-quotable>)
(array
#[#[0 0 1 1 2 2]
#[0 0 1 1 2 2]
#[3 3 4 4 5 5]
#[3 3 4 4 5 5]
#[6 6 7 7 8 8]
#[6 6 7 7 8 8]])
Almost all array transformations, including Slicing, are implemented using array-transform or its unsafe counterpart.
procedure
( array-append* arrs[k])→(Array A)
- : #(struct:Array
(Indexes
Index
(Boxof Boolean)
(-> Void)
(-> Indexes (U 'a 'b 'c 'd Byte)))
#<syntax:build/user/8.18/pkgs/math-lib/math/private/array/typed-array-struct.rkt:56:13 prop:equal+hash>
#<syntax:build/user/8.18/pkgs/math-lib/math/private/array/typed-array-struct.rkt:55:13 prop:custom-write>
#<syntax:build/user/8.18/pkgs/math-lib/math/private/array/typed-array-struct.rkt:54:13 prop:custom-print-quotable>)
(array #[#[0 1] #[2 3] #['a 'b] #['c 'd]])
- : #(struct:Array
(Indexes
Index
(Boxof Boolean)
(-> Void)
(-> Indexes (U 'a 'b 'c 'd Byte)))
#<syntax:build/user/8.18/pkgs/math-lib/math/private/array/typed-array-struct.rkt:56:13 prop:equal+hash>
#<syntax:build/user/8.18/pkgs/math-lib/math/private/array/typed-array-struct.rkt:55:13 prop:custom-write>
#<syntax:build/user/8.18/pkgs/math-lib/math/private/array/typed-array-struct.rkt:54:13 prop:custom-print-quotable>)
(array #[#[0 1 'a 'b] #[2 3 'c 'd]])
- : #(struct:Array
(Indexes Index (Boxof Boolean) (-> Void) (-> Indexes (U 'x Byte)))
#<syntax:build/user/8.18/pkgs/math-lib/math/private/array/typed-array-struct.rkt:56:13 prop:equal+hash>
#<syntax:build/user/8.18/pkgs/math-lib/math/private/array/typed-array-struct.rkt:55:13 prop:custom-write>
#<syntax:build/user/8.18/pkgs/math-lib/math/private/array/typed-array-struct.rkt:54:13 prop:custom-print-quotable>)
(array #[#[0 1] #[2 3] #['x 'x]])
procedure
( array-axis-insert arrk[dk])→(Array A)
k:Integer
- : #(struct:Array
(Indexes Index (Boxof Boolean) (-> Void) (-> Indexes Byte))
#<syntax:build/user/8.18/pkgs/math-lib/math/private/array/typed-array-struct.rkt:56:13 prop:equal+hash>
#<syntax:build/user/8.18/pkgs/math-lib/math/private/array/typed-array-struct.rkt:55:13 prop:custom-write>
#<syntax:build/user/8.18/pkgs/math-lib/math/private/array/typed-array-struct.rkt:54:13 prop:custom-print-quotable>)
(array #[#[#[0 1] #[2 3]]])
- : #(struct:Array
(Indexes Index (Boxof Boolean) (-> Void) (-> Indexes Byte))
#<syntax:build/user/8.18/pkgs/math-lib/math/private/array/typed-array-struct.rkt:56:13 prop:equal+hash>
#<syntax:build/user/8.18/pkgs/math-lib/math/private/array/typed-array-struct.rkt:55:13 prop:custom-write>
#<syntax:build/user/8.18/pkgs/math-lib/math/private/array/typed-array-struct.rkt:54:13 prop:custom-print-quotable>)
(array #[#[#[0 1]] #[#[2 3]]])
- : #(struct:Array
(Indexes Index (Boxof Boolean) (-> Void) (-> Indexes Byte))
#<syntax:build/user/8.18/pkgs/math-lib/math/private/array/typed-array-struct.rkt:56:13 prop:equal+hash>
#<syntax:build/user/8.18/pkgs/math-lib/math/private/array/typed-array-struct.rkt:55:13 prop:custom-write>
#<syntax:build/user/8.18/pkgs/math-lib/math/private/array/typed-array-struct.rkt:54:13 prop:custom-print-quotable>)
(array #[#[#[0] #[1]] #[#[2] #[3]]])
- : #(struct:Array
(Indexes Index (Boxof Boolean) (-> Void) (-> Indexes Byte))
#<syntax:build/user/8.18/pkgs/math-lib/math/private/array/typed-array-struct.rkt:56:13 prop:equal+hash>
#<syntax:build/user/8.18/pkgs/math-lib/math/private/array/typed-array-struct.rkt:55:13 prop:custom-write>
#<syntax:build/user/8.18/pkgs/math-lib/math/private/array/typed-array-struct.rkt:54:13 prop:custom-print-quotable>)
(array #[#[#[0 1] #[0 1]] #[#[2 3] #[2 3]]])
procedure
( array-axis-ref arrkjk)→(Array A)
k:Integerjk:Integer
- : #(struct:Array
(Indexes Index (Boxof Boolean) (-> Void) (-> Indexes Byte))
#<syntax:build/user/8.18/pkgs/math-lib/math/private/array/typed-array-struct.rkt:56:13 prop:equal+hash>
#<syntax:build/user/8.18/pkgs/math-lib/math/private/array/typed-array-struct.rkt:55:13 prop:custom-write>
#<syntax:build/user/8.18/pkgs/math-lib/math/private/array/typed-array-struct.rkt:54:13 prop:custom-print-quotable>)
(array #[0 1])
- : #(struct:Array
(Indexes Index (Boxof Boolean) (-> Void) (-> Indexes Byte))
#<syntax:build/user/8.18/pkgs/math-lib/math/private/array/typed-array-struct.rkt:56:13 prop:equal+hash>
#<syntax:build/user/8.18/pkgs/math-lib/math/private/array/typed-array-struct.rkt:55:13 prop:custom-write>
#<syntax:build/user/8.18/pkgs/math-lib/math/private/array/typed-array-struct.rkt:54:13 prop:custom-print-quotable>)
(array #[2 3])
- : #(struct:Array
(Indexes Index (Boxof Boolean) (-> Void) (-> Indexes Byte))
#<syntax:build/user/8.18/pkgs/math-lib/math/private/array/typed-array-struct.rkt:56:13 prop:equal+hash>
#<syntax:build/user/8.18/pkgs/math-lib/math/private/array/typed-array-struct.rkt:55:13 prop:custom-write>
#<syntax:build/user/8.18/pkgs/math-lib/math/private/array/typed-array-struct.rkt:54:13 prop:custom-print-quotable>)
(array #[0 2])
procedure
( array-axis-swap arrk0k1)→(Array A)
k0:Integerk1:Integer
- : #(struct:Array
(Indexes Index (Boxof Boolean) (-> Void) (-> Indexes Byte))
#<syntax:build/user/8.18/pkgs/math-lib/math/private/array/typed-array-struct.rkt:56:13 prop:equal+hash>
#<syntax:build/user/8.18/pkgs/math-lib/math/private/array/typed-array-struct.rkt:55:13 prop:custom-write>
#<syntax:build/user/8.18/pkgs/math-lib/math/private/array/typed-array-struct.rkt:54:13 prop:custom-print-quotable>)
(array #[#[0 2] #[1 3]])
> arr- : #(struct:Array
(Indexes Index (Boxof Boolean) (-> Void) (-> Indexes Indexes))
#<syntax:build/user/8.18/pkgs/math-lib/math/private/array/typed-array-struct.rkt:56:13 prop:equal+hash>
#<syntax:build/user/8.18/pkgs/math-lib/math/private/array/typed-array-struct.rkt:55:13 prop:custom-write>
#<syntax:build/user/8.18/pkgs/math-lib/math/private/array/typed-array-struct.rkt:54:13 prop:custom-print-quotable>)
(array
#[#[#['#(0 0 0) '#(0 0 1)]
#['#(0 1 0) '#(0 1 1)]]
#[#['#(1 0 0) '#(1 0 1)]
#['#(1 1 0) '#(1 1 1)]]])
- : #(struct:Array
(Indexes Index (Boxof Boolean) (-> Void) (-> Indexes Indexes))
#<syntax:build/user/8.18/pkgs/math-lib/math/private/array/typed-array-struct.rkt:56:13 prop:equal+hash>
#<syntax:build/user/8.18/pkgs/math-lib/math/private/array/typed-array-struct.rkt:55:13 prop:custom-write>
#<syntax:build/user/8.18/pkgs/math-lib/math/private/array/typed-array-struct.rkt:54:13 prop:custom-print-quotable>)
(array
#[#[#['#(0 0 0) '#(0 0 1)]
#['#(1 0 0) '#(1 0 1)]]
#[#['#(0 1 0) '#(0 1 1)]
#['#(1 1 0) '#(1 1 1)]]])
- : #(struct:Array
(Indexes Index (Boxof Boolean) (-> Void) (-> Indexes Indexes))
#<syntax:build/user/8.18/pkgs/math-lib/math/private/array/typed-array-struct.rkt:56:13 prop:equal+hash>
#<syntax:build/user/8.18/pkgs/math-lib/math/private/array/typed-array-struct.rkt:55:13 prop:custom-write>
#<syntax:build/user/8.18/pkgs/math-lib/math/private/array/typed-array-struct.rkt:54:13 prop:custom-print-quotable>)
(array
#[#[#['#(0 0 0) '#(0 1 0)]
#['#(0 0 1) '#(0 1 1)]]
#[#['#(1 0 0) '#(1 1 0)]
#['#(1 0 1) '#(1 1 1)]]])
procedure
( array-axis-permute arrperm)→(Array A)
The list perm represents a mapping from source axis numbers to destination axis numbers: the source is the list position, the destination is the list element. For example, the permutation '(012) is the identity permutation for three-dimensional arrays, '(10) swaps axes 0 and 1, and '(3120) swaps axes 0 and 3.
The permutation must contain each integer from 0 to (- (array-dims arr)1) exactly once.
- : #(struct:Array
(Indexes Index (Boxof Boolean) (-> Void) (-> Indexes Byte))
#<syntax:build/user/8.18/pkgs/math-lib/math/private/array/typed-array-struct.rkt:56:13 prop:equal+hash>
#<syntax:build/user/8.18/pkgs/math-lib/math/private/array/typed-array-struct.rkt:55:13 prop:custom-write>
#<syntax:build/user/8.18/pkgs/math-lib/math/private/array/typed-array-struct.rkt:54:13 prop:custom-print-quotable>)
(array #[#[0 2] #[1 3]])
- : #(struct:Array
(Indexes Index (Boxof Boolean) (-> Void) (-> Indexes Byte))
#<syntax:build/user/8.18/pkgs/math-lib/math/private/array/typed-array-struct.rkt:56:13 prop:equal+hash>
#<syntax:build/user/8.18/pkgs/math-lib/math/private/array/typed-array-struct.rkt:55:13 prop:custom-write>
#<syntax:build/user/8.18/pkgs/math-lib/math/private/array/typed-array-struct.rkt:54:13 prop:custom-print-quotable>)
(array #[#[0 2] #[1 3]])
procedure
( array-reshape arrds)→(Array A)
ds:In-Indexes
> arr- : #(struct:Array
(Indexes Index (Boxof Boolean) (-> Void) (-> Indexes Indexes))
#<syntax:build/user/8.18/pkgs/math-lib/math/private/array/typed-array-struct.rkt:56:13 prop:equal+hash>
#<syntax:build/user/8.18/pkgs/math-lib/math/private/array/typed-array-struct.rkt:55:13 prop:custom-write>
#<syntax:build/user/8.18/pkgs/math-lib/math/private/array/typed-array-struct.rkt:54:13 prop:custom-print-quotable>)
(array #[#['#(0 0) '#(0 1) '#(0 2)] #['#(1 0) '#(1 1) '#(1 2)]])
- : #(struct:Array
(Indexes Index (Boxof Boolean) (-> Void) (-> Indexes Indexes))
#<syntax:build/user/8.18/pkgs/math-lib/math/private/array/typed-array-struct.rkt:56:13 prop:equal+hash>
#<syntax:build/user/8.18/pkgs/math-lib/math/private/array/typed-array-struct.rkt:55:13 prop:custom-write>
#<syntax:build/user/8.18/pkgs/math-lib/math/private/array/typed-array-struct.rkt:54:13 prop:custom-print-quotable>)
(array #[#['#(0 0) '#(0 1)] #['#(0 2) '#(1 0)] #['#(1 1) '#(1 2)]])
- : #(struct:Array
(Indexes Index (Boxof Boolean) (-> Void) (-> Indexes Index))
#<syntax:build/user/8.18/pkgs/math-lib/math/private/array/typed-array-struct.rkt:56:13 prop:equal+hash>
#<syntax:build/user/8.18/pkgs/math-lib/math/private/array/typed-array-struct.rkt:55:13 prop:custom-write>
#<syntax:build/user/8.18/pkgs/math-lib/math/private/array/typed-array-struct.rkt:54:13 prop:custom-print-quotable>)
(array #[0 1 2 3 4 5 6 7 8])
procedure
( array-flatten arr)→(Array A)
- : #(struct:Array
(Indexes Index (Boxof Boolean) (-> Void) (-> Indexes Positive-Byte))
#<syntax:build/user/8.18/pkgs/math-lib/math/private/array/typed-array-struct.rkt:56:13 prop:equal+hash>
#<syntax:build/user/8.18/pkgs/math-lib/math/private/array/typed-array-struct.rkt:55:13 prop:custom-write>
#<syntax:build/user/8.18/pkgs/math-lib/math/private/array/typed-array-struct.rkt:54:13 prop:custom-print-quotable>)
(array #[10])
- : #(struct:Array
(Indexes Index (Boxof Boolean) (-> Void) (-> Indexes Byte))
#<syntax:build/user/8.18/pkgs/math-lib/math/private/array/typed-array-struct.rkt:56:13 prop:equal+hash>
#<syntax:build/user/8.18/pkgs/math-lib/math/private/array/typed-array-struct.rkt:55:13 prop:custom-write>
#<syntax:build/user/8.18/pkgs/math-lib/math/private/array/typed-array-struct.rkt:54:13 prop:custom-print-quotable>)
(array #[0 1 2 3])