2020
2121/// <reference types="@stdlib/types"/>
2222
23- import { ndarray , typedndarray , genericndarray } from '@stdlib/types/ndarray' ;
23+ import { typedndarray } from '@stdlib/types/ndarray' ;
2424
2525/**
2626* Rotates a matrix (or a stack of matrices) 90 degrees clockwise.
@@ -39,49 +39,7 @@ import { ndarray, typedndarray, genericndarray } from '@stdlib/types/ndarray';
3939* var y = rotr90( x, 1, false );
4040* // returns <ndarray>[ [ 3, 1 ], [ 4, 2 ] ]
4141*/
42- declare function rotr90 < T extends typedndarray < unknown > = typedndarray < unknown > > ( x : T , k : number , writable : boolean ) : T ;
43-
44- /**
45- * Rotates a matrix (or a stack of matrices) 90 degrees clockwise.
46- *
47- * @param x - input array
48- * @param k - number of times to rotate by 90 degrees
49- * @param writable - boolean indicating whether the returned ndarray should be writable
50- * @returns ndarray view
51- *
52- * @example
53- * var array = require( '@stdlib/ndarray/array' );
54- *
55- * var x = array( [ [ 1, 2 ], [ 3, 4 ] ], {
56- * 'dtype': 'generic'
57- * });
58- * // returns <ndarray>[ [ 1, 2 ], [ 3, 4 ] ]
59- *
60- * var y = rotr90( x, 1, false );
61- * // returns <ndarray>[ [ 3, 1 ], [ 4, 2 ] ]
62- */
63- declare function rotr90 < T extends genericndarray < unknown > = genericndarray < unknown > > ( x : T , k : number , writable : boolean ) : T ;
64-
65- /**
66- * Rotates a matrix (or a stack of matrices) 90 degrees clockwise.
67- *
68- * @param x - input array
69- * @param k - number of times to rotate by 90 degrees
70- * @param writable - boolean indicating whether the returned ndarray should be writable
71- * @returns ndarray view
72- *
73- * @example
74- * var array = require( '@stdlib/ndarray/array' );
75- *
76- * var x = array( [ [ 1, 2 ], [ 3, 4 ] ], {
77- * 'dtype': 'generic'
78- * });
79- * // returns <ndarray>[ [ 1, 2 ], [ 3, 4 ] ]
80- *
81- * var y = rotr90( x, 1, false );
82- * // returns <ndarray>[ [ 3, 1 ], [ 4, 2 ] ]
83- */
84- declare function rotr90 ( x : ndarray , k : number , writable : boolean ) : ndarray ;
42+ declare function rotr90 < T = unknown , U extends typedndarray < T > = typedndarray < T > > ( x : U , k : number , writable : boolean ) : U ;
8543
8644
8745// EXPORTS //
0 commit comments