Typeclass interface for sorting implementations
Return the integer offset of the maximum element, or -1 for an empty array
Return the integer offset of the maximum element, or -1 for an empty array
Return the integer offset of the minimum element, or -1 for an empty array
Return the integer offset of the minimum element, or -1 for an empty array
Stable indirect sort resulting in permutation of numbers [0, n), whose application on an array results in a sorted array.
Stable indirect sort resulting in permutation of numbers [0, n), whose application on an array results in a sorted array.
Array to sort
Create a new initialized empty array
Create a new initialized empty array
Fill array with value
Fill array with value
Filter an array based on a predicate function, wherever that predicate is true
Filter an array based on a predicate function, wherever that predicate is true
Flatten a sequence of arrays into a single array
Flatten a sequence of arrays into a single array
Derived from numpy 1.
Derived from numpy 1.7
Return evenly spaced numbers over a specified interval.
Returns num evenly spaced samples, calculated over the interval [start, stop].
The endpoint of the interval can optionally be excluded.
Put a value into array arr at particular offsets provided by a boolean array where its locations are true, so as to produce a new array.
Put a value into array arr at particular offsets provided by a boolean array where its locations are true, so as to produce a new array.
Put a single value into array arr at particular offsets, so as to produce a new array.
Put a single value into array arr at particular offsets, so as to produce a new array.
Put n values into array arr at particular offsets, where the values come from another array, so as to produce a new array.
Put n values into array arr at particular offsets, where the values come from another array, so as to produce a new array.
Generate an array of random doubles on [-1, 1] excluding 0
Generate an array of random doubles on [-1, 1] excluding 0
Generate an array of random positive doubles on (0, 1]
Generate an array of random positive doubles on (0, 1]
Generate an array of random integers excluding 0
Generate an array of random integers excluding 0
Generate an array of random positive integers excluding 0
Generate an array of random positive integers excluding 0
Generate an array of a random long integers excluding 0
Generate an array of a random long integers excluding 0
Generate an array of random long positive integers excluding 0
Generate an array of random long positive integers excluding 0
Generate an array of random doubles which is normally distributed with a mean of zero and stdev of one.
Generate an array of random doubles which is normally distributed with a mean of zero and stdev of one.
Generate an array of random doubles which is normally distributed with a mean of mu and stdev of sigma.
Generate an array of random doubles which is normally distributed with a mean of mu and stdev of sigma.
Create a new array consisting of a range of numbers from a lower bound up to, but not including, an upper bound, at a particular increment (default 1)
Create a new array consisting of a range of numbers from a lower bound up to, but not including, an upper bound, at a particular increment (default 1)
Remove values from array arr at particular offsets so as to produce a new array.
Remove values from array arr at particular offsets so as to produce a new array.
Reverse an array
Reverse an array
Sends values from an array to particular offsets so as to produce a new array.
Sends values from an array to particular offsets so as to produce a new array.
This does the inverse of 'take'; ie, each integer I at offset O in offsets
works to "send" input[O] to output[I]. Eg, Array(2,0,1) permutes locations as
follows:
For example,
send(Array(5,6,7), Array(2,0,1)) == Array(6,7,5)
Return a uniform random permutation of the array
Return a uniform random permutation of the array
Stable sort of array argument (not destructive), using radix sort implementation wherever possible.
Stable sort of array argument (not destructive), using radix sort implementation wherever possible.
Array to sort
Compute the sum of the array at particular offets.
Compute the sum of the array at particular offets. If any of the offets is -1, the pass-by-name value 'missing' is used instead.
For example,
sum(Array(1,2,3,4), Array(0,2,), 0)
Takes values from array arr at particular offsets so as to produce a new array.
Takes values from array arr at particular offsets so as to produce a new array.
Offset -1 is mapped to by-name parameter missing
.
Note that each integer I at offset O in offsets
works to "take" input[I] to
output[O]. Eg, Array(2,0,1) permutes locations as follows:
For example,
take(Array(5,6,7), Array(2,0,1), -1) == Array(7,5,6)
Repeat elements of the array some number of times
Repeat elements of the array some number of times
This package contains utilities for working with arrays that are specialized for numeric types.