naginterfaces.library.sort.permute_check¶
- naginterfaces.library.sort.permute_check(iperm, m1)[source]¶
permute_check
checks the validity of a permutation.For full information please refer to the NAG Library document for m01zb
https://support.nag.com/numeric/nl/nagdoc_30.2/flhtml/m01/m01zbf.html
- Parameters
- ipermint, array-like, shape
Elements to of must be set to values which are supposed to be a permutation of the integers to . If they are a valid permutation, the function exits with no exception or warning is raised.
- m1int
Note: this argument represents an array index; the value you supply must be base-1 for compatibility with the NAG Engine.
The range of elements used in the array and the range of values in the permutation, as specified under .
- Returns
- ipermint, ndarray, shape
Used as internal workpsace prior to being restored and hence is unchanged.
- Raises
- NagValueError
- (errno )
On entry, and .
Constraint: .
- (errno )
On entry, .
Constraint: .
- (errno )
On entry, .
Constraint: .
- (errno )
does not contain a permutation of the integers to . contains an out-of-range value: , .
- (errno )
does not contain a permutation of the integers to . contains a repeated value: .
- Notes
No equivalent traditional C interface for this routine exists in the NAG Library.
permute_check
can be used to check the validity of user-supplied ranks or indices, without the ranks or indices being corrupted.