Skip to content

Commit 79fe27e

Browse files
authored
Merge branch 'develop' into blas/glastidxofrow
2 parents 38973ce + 923db7f commit 79fe27e

139 files changed

Lines changed: 4039 additions & 305 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

docs/migration-guides/numpy/data/numpy_2_4.csv

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -153,13 +153,13 @@ eye,(planned)
153153
f2py,N/A
154154
fabs,(planned)
155155
fft,(planned)
156-
fill_diagonal,(planned)
156+
fill_diagonal,@stdlib/ndarray/fill-diagonal
157157
finfo,(planned)
158158
fix,N/A
159159
flatiter,(planned)
160160
flatnonzero,(planned)
161161
flexible,N/A
162-
flip,(planned)
162+
flip,@stdlib/ndarray/reverse-dimensions
163163
fliplr,@stdlib/ndarray/fliplr
164164
flipud,@stdlib/ndarray/flipud
165165
float16,@stdlib/ndarray/dtypes
@@ -178,7 +178,7 @@ frexp,(planned)
178178
from_dlpack,(planned)
179179
frombuffer,N/A
180180
fromfile,(planned)
181-
fromfunction,(planned)
181+
fromfunction,@stdlib/ndarray/full-by
182182
fromiter,(planned)
183183
frompyfunc,(planned)
184184
fromregex,(planned)
@@ -212,7 +212,7 @@ i0,(planned)
212212
identity,(planned)
213213
iinfo,(planned)
214214
imag,(planned)
215-
in1d,(planned)
215+
in1d,N/A
216216
index_exp,N/A
217217
indices,(planned)
218218
inexact,N/A
@@ -259,9 +259,9 @@ less,(planned)
259259
less_equal,(planned)
260260
lexsort,(planned)
261261
lib,N/A
262-
linalg,(planned)
262+
linalg,N/A
263263
linspace,@stdlib/blas/ext/linspace
264-
little_endian,N/A
264+
little_endian,@stdlib/assert/is-little-endian
265265
load,(planned)
266266
loadtxt,(planned)
267267
log,(planned)
@@ -282,7 +282,7 @@ ma,(planned)
282282
mask_indices,(planned)
283283
matmul,(planned)
284284
matrix,(planned)
285-
matrix_transpose,(planned)
285+
matrix_transpose,@stdlib/ndarray/transpose
286286
max,@stdlib/stats/max
287287
maximum,(planned)
288288
may_share_memory,(planned)

lib/node_modules/@stdlib/array/base/accessors/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ console.log( 'Accessor protocol: %s', bool );
115115

116116
// Retrieve an array element:
117117
var v = obj.accessors[ 0 ]( x, 1 );
118-
// returns <Complex64>
118+
// returns <Complex64>[ 2.0, 3.0 ]
119119

120120
console.log( 'x[1] = %s', v.toString() );
121121
```

lib/node_modules/@stdlib/array/base/accessors/docs/types/index.d.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -761,7 +761,7 @@ declare function accessors( x: Uint8ClampedArray ): Uint8cAccessorObject;
761761
* // returns [ <Function>, <Function> ]
762762
*
763763
* var v = fcns[ 0 ]( x, 1 );
764-
* // returns <Complex128>
764+
* // returns <Complex128>[ 3.0, 4.0 ]
765765
*/
766766
declare function accessors( x: Complex128Array ): Complex128AccessorObject;
767767

@@ -789,7 +789,7 @@ declare function accessors( x: Complex128Array ): Complex128AccessorObject;
789789
* // returns [ <Function>, <Function> ]
790790
*
791791
* var v = fcns[ 0 ]( x, 1 );
792-
* // returns <Complex64>
792+
* // returns <Complex64>[ 3.0, 4.0 ]
793793
*/
794794
declare function accessors( x: Complex64Array ): Complex64AccessorObject;
795795

lib/node_modules/@stdlib/array/base/arraylike2object/docs/types/index.d.ts

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -650,7 +650,7 @@ interface GetSetAccessorObject<T> {
650650
* var fcns = obj.accessors;
651651
* // returns [ <Function>, <Function> ]
652652
*
653-
* var v = fcns[ 0 ]( x.data, 2 );
653+
* var v = fcns[ 0 ]( x, 2 );
654654
* // returns 3
655655
*/
656656
declare function arraylike2object( x: Float64Array ): Float64AccessorObject;
@@ -678,7 +678,7 @@ declare function arraylike2object( x: Float64Array ): Float64AccessorObject;
678678
* var fcns = obj.accessors;
679679
* // returns [ <Function>, <Function> ]
680680
*
681-
* var v = fcns[ 0 ]( x.data, 2 );
681+
* var v = fcns[ 0 ]( x, 2 );
682682
* // returns 3
683683
*/
684684
declare function arraylike2object( x: Float32Array ): Float32AccessorObject;
@@ -706,7 +706,7 @@ declare function arraylike2object( x: Float32Array ): Float32AccessorObject;
706706
* var fcns = obj.accessors;
707707
* // returns [ <Function>, <Function> ]
708708
*
709-
* var v = fcns[ 0 ]( x.data, 2 );
709+
* var v = fcns[ 0 ]( x, 2 );
710710
* // returns 3
711711
*/
712712
declare function arraylike2object( x: Int32Array ): Int32AccessorObject;
@@ -734,7 +734,7 @@ declare function arraylike2object( x: Int32Array ): Int32AccessorObject;
734734
* var fcns = obj.accessors;
735735
* // returns [ <Function>, <Function> ]
736736
*
737-
* var v = fcns[ 0 ]( x.data, 2 );
737+
* var v = fcns[ 0 ]( x, 2 );
738738
* // returns 3
739739
*/
740740
declare function arraylike2object( x: Int16Array ): Int16AccessorObject;
@@ -762,7 +762,7 @@ declare function arraylike2object( x: Int16Array ): Int16AccessorObject;
762762
* var fcns = obj.accessors;
763763
* // returns [ <Function>, <Function> ]
764764
*
765-
* var v = fcns[ 0 ]( x.data, 2 );
765+
* var v = fcns[ 0 ]( x, 2 );
766766
* // returns 3
767767
*/
768768
declare function arraylike2object( x: Int8Array ): Int8AccessorObject;
@@ -790,7 +790,7 @@ declare function arraylike2object( x: Int8Array ): Int8AccessorObject;
790790
* var fcns = obj.accessors;
791791
* // returns [ <Function>, <Function> ]
792792
*
793-
* var v = fcns[ 0 ]( x.data, 2 );
793+
* var v = fcns[ 0 ]( x, 2 );
794794
* // returns 3
795795
*/
796796
declare function arraylike2object( x: Uint32Array ): Uint32AccessorObject;
@@ -818,7 +818,7 @@ declare function arraylike2object( x: Uint32Array ): Uint32AccessorObject;
818818
* var fcns = obj.accessors;
819819
* // returns [ <Function>, <Function> ]
820820
*
821-
* var v = fcns[ 0 ]( x.data, 2 );
821+
* var v = fcns[ 0 ]( x, 2 );
822822
* // returns 3
823823
*/
824824
declare function arraylike2object( x: Uint16Array ): Uint16AccessorObject;
@@ -846,7 +846,7 @@ declare function arraylike2object( x: Uint16Array ): Uint16AccessorObject;
846846
* var fcns = obj.accessors;
847847
* // returns [ <Function>, <Function> ]
848848
*
849-
* var v = fcns[ 0 ]( x.data, 2 );
849+
* var v = fcns[ 0 ]( x, 2 );
850850
* // returns 3
851851
*/
852852
declare function arraylike2object( x: Uint8Array ): Uint8AccessorObject;
@@ -874,7 +874,7 @@ declare function arraylike2object( x: Uint8Array ): Uint8AccessorObject;
874874
* var fcns = obj.accessors;
875875
* // returns [ <Function>, <Function> ]
876876
*
877-
* var v = fcns[ 0 ]( x.data, 2 );
877+
* var v = fcns[ 0 ]( x, 2 );
878878
* // returns 3
879879
*/
880880
declare function arraylike2object( x: Uint8ClampedArray ): Uint8cAccessorObject;
@@ -903,7 +903,7 @@ declare function arraylike2object( x: Uint8ClampedArray ): Uint8cAccessorObject;
903903
* // returns [ <Function>, <Function> ]
904904
*
905905
* var v = fcns[ 0 ]( x, 1 );
906-
* // returns <Complex128>
906+
* // returns <Complex128>[ 3.0, 4.0 ]
907907
*/
908908
declare function arraylike2object( x: Complex128Array ): Complex128AccessorObject;
909909

@@ -931,7 +931,7 @@ declare function arraylike2object( x: Complex128Array ): Complex128AccessorObjec
931931
* // returns [ <Function>, <Function> ]
932932
*
933933
* var v = fcns[ 0 ]( x, 1 );
934-
* // returns <Complex64>
934+
* // returns <Complex64>[ 3.0, 4.0 ]
935935
*/
936936
declare function arraylike2object( x: Complex64Array ): Complex64AccessorObject;
937937

@@ -968,7 +968,7 @@ declare function arraylike2object( x: Complex64Array ): Complex64AccessorObject;
968968
* var fcns = obj.accessors;
969969
* // returns [ <Function>, <Function> ]
970970
*
971-
* var v = fcns[ 0 ]( x.data, 2 );
971+
* var v = fcns[ 0 ]( x, 2 );
972972
* // returns 3
973973
*/
974974
declare function arraylike2object<T = unknown>( x: AccessorArrayLike<T> ): GetSetAccessorObject<T>;
@@ -994,7 +994,7 @@ declare function arraylike2object<T = unknown>( x: AccessorArrayLike<T> ): GetSe
994994
* var fcns = obj.accessors;
995995
* // returns [ <Function>, <Function> ]
996996
*
997-
* var v = fcns[ 0 ]( x.data, 2 );
997+
* var v = fcns[ 0 ]( x, 2 );
998998
* // returns 3
999999
*/
10001000
declare function arraylike2object<T = unknown>( x: Array<T> ): GenericAccessorObject<T>;
@@ -1026,7 +1026,7 @@ declare function arraylike2object<T = unknown>( x: Array<T> ): GenericAccessorOb
10261026
* var fcns = obj.accessors;
10271027
* // returns [ <Function>, <Function> ]
10281028
*
1029-
* var v = fcns[ 0 ]( x.data, 2 );
1029+
* var v = fcns[ 0 ]( x, 2 );
10301030
* // returns 3
10311031
*/
10321032
declare function arraylike2object<T = unknown>( x: Collection<T> ): IndexedAccessorObject<T>;

lib/node_modules/@stdlib/blas/base/ndarray/README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ The namespace exposes the following APIs:
4747

4848
- <span class="signature">[`caxpy( arrays )`][@stdlib/blas/base/ndarray/caxpy]</span><span class="delimiter">: </span><span class="description">multiply a one-dimensional single-precision complex floating-point ndarray `x` by a constant `alpha` and add the result to a one-dimensional single-precision complex floating-point ndarray `y`.</span>
4949
- <span class="signature">[`ccopy( arrays )`][@stdlib/blas/base/ndarray/ccopy]</span><span class="delimiter">: </span><span class="description">copy values from a one-dimensional single-precision complex floating-point ndarray `x` into a one-dimensional single-precision complex floating-point ndarray `y`.</span>
50+
- <span class="signature">[`cscal( arrays )`][@stdlib/blas/base/ndarray/cscal]</span><span class="delimiter">: </span><span class="description">multiply a one-dimensional single-precision complex floating-point ndarray by a scalar constant.</span>
5051
- <span class="signature">[`cswap( arrays )`][@stdlib/blas/base/ndarray/cswap]</span><span class="delimiter">: </span><span class="description">interchange two one-dimensional single-precision complex floating-point ndarrays.</span>
5152
- <span class="signature">[`dasum( arrays )`][@stdlib/blas/base/ndarray/dasum]</span><span class="delimiter">: </span><span class="description">calculate the sum of absolute values for all elements in a one-dimensional double-precision floating-point ndarray.</span>
5253
- <span class="signature">[`daxpy( arrays )`][@stdlib/blas/base/ndarray/daxpy]</span><span class="delimiter">: </span><span class="description">multiply a one-dimensional double-precision floating-point ndarray `x` by a constant `alpha` and add the result to a one-dimensional double-precision floating-point ndarray `y`.</span>
@@ -58,6 +59,7 @@ The namespace exposes the following APIs:
5859
- <span class="signature">[`gaxpy( arrays )`][@stdlib/blas/base/ndarray/gaxpy]</span><span class="delimiter">: </span><span class="description">multiply a one-dimensional ndarray `x` by a constant `alpha` and add the result to a one-dimensional ndarray `y`.</span>
5960
- <span class="signature">[`gcopy( arrays )`][@stdlib/blas/base/ndarray/gcopy]</span><span class="delimiter">: </span><span class="description">copy values from a one-dimensional ndarray `x` into a one-dimensional ndarray `y`.</span>
6061
- <span class="signature">[`gdot( arrays )`][@stdlib/blas/base/ndarray/gdot]</span><span class="delimiter">: </span><span class="description">calculate the dot product of two one-dimensional ndarrays.</span>
62+
- <span class="signature">[`gscal( arrays )`][@stdlib/blas/base/ndarray/gscal]</span><span class="delimiter">: </span><span class="description">multiply a one-dimensional ndarray by a scalar constant.</span>
6163
- <span class="signature">[`gswap( arrays )`][@stdlib/blas/base/ndarray/gswap]</span><span class="delimiter">: </span><span class="description">interchange two one-dimensional ndarrays.</span>
6264
- <span class="signature">[`sasum( arrays )`][@stdlib/blas/base/ndarray/sasum]</span><span class="delimiter">: </span><span class="description">calculate the sum of absolute values for all elements in a one-dimensional single-precision floating-point ndarray.</span>
6365
- <span class="signature">[`saxpy( arrays )`][@stdlib/blas/base/ndarray/saxpy]</span><span class="delimiter">: </span><span class="description">multiply a one-dimensional single-precision floating-point ndarray `x` by a constant `alpha` and add the result to a one-dimensional single-precision floating-point ndarray `y`.</span>
@@ -114,6 +116,8 @@ console.log( objectKeys( ns ) );
114116

115117
[@stdlib/blas/base/ndarray/ccopy]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/blas/base/ndarray/ccopy
116118

119+
[@stdlib/blas/base/ndarray/cscal]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/blas/base/ndarray/cscal
120+
117121
[@stdlib/blas/base/ndarray/cswap]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/blas/base/ndarray/cswap
118122

119123
[@stdlib/blas/base/ndarray/dasum]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/blas/base/ndarray/dasum
@@ -136,6 +140,8 @@ console.log( objectKeys( ns ) );
136140

137141
[@stdlib/blas/base/ndarray/gdot]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/blas/base/ndarray/gdot
138142

143+
[@stdlib/blas/base/ndarray/gscal]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/blas/base/ndarray/gscal
144+
139145
[@stdlib/blas/base/ndarray/gswap]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/blas/base/ndarray/gswap
140146

141147
[@stdlib/blas/base/ndarray/sasum]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/blas/base/ndarray/sasum

lib/node_modules/@stdlib/blas/base/ndarray/docs/types/index.d.ts

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222

2323
import caxpy = require( '@stdlib/blas/base/ndarray/caxpy' );
2424
import ccopy = require( '@stdlib/blas/base/ndarray/ccopy' );
25+
import cscal = require( '@stdlib/blas/base/ndarray/cscal' );
2526
import cswap = require( '@stdlib/blas/base/ndarray/cswap' );
2627
import dasum = require( '@stdlib/blas/base/ndarray/dasum' );
2728
import daxpy = require( '@stdlib/blas/base/ndarray/daxpy' );
@@ -33,6 +34,7 @@ import gasum = require( '@stdlib/blas/base/ndarray/gasum' );
3334
import gaxpy = require( '@stdlib/blas/base/ndarray/gaxpy' );
3435
import gcopy = require( '@stdlib/blas/base/ndarray/gcopy' );
3536
import gdot = require( '@stdlib/blas/base/ndarray/gdot' );
37+
import gscal = require( '@stdlib/blas/base/ndarray/gscal' );
3638
import gswap = require( '@stdlib/blas/base/ndarray/gswap' );
3739
import sasum = require( '@stdlib/blas/base/ndarray/sasum' );
3840
import saxpy = require( '@stdlib/blas/base/ndarray/saxpy' );
@@ -109,6 +111,38 @@ interface Namespace {
109111
*/
110112
ccopy: typeof ccopy;
111113

114+
/**
115+
* Multiplies a one-dimensional single-precision complex floating-point ndarray by a scalar constant.
116+
*
117+
* ## Notes
118+
*
119+
* - The function expects the following ndarrays:
120+
*
121+
* - a one-dimensional input ndarray.
122+
* - a zero-dimensional ndarray containing a scalar constant.
123+
*
124+
* @param arrays - array-like object containing ndarrays
125+
* @returns input ndarray
126+
*
127+
* @example
128+
* var Complex64Vector = require( '@stdlib/ndarray/vector/complex64' );
129+
* var Complex64 = require( '@stdlib/complex/float32/ctor' );
130+
* var scalar2ndarray = require( '@stdlib/ndarray/from-scalar' );
131+
*
132+
* var x = new Complex64Vector( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ] );
133+
*
134+
* var alpha = scalar2ndarray( new Complex64( 2.0, 0.0 ), {
135+
* 'dtype': 'complex64'
136+
* });
137+
*
138+
* var y = ns.cscal( [ x, alpha ] );
139+
* // returns <ndarray>[ <Complex64>[ 2.0, 4.0 ], <Complex64>[ 6.0, 8.0 ], <Complex64>[ 10.0, 12.0 ] ]
140+
*
141+
* var bool = ( y === x );
142+
* // returns true
143+
*/
144+
cscal: typeof cscal;
145+
112146
/**
113147
* Interchanges two one-dimensional single-precision complex floating-point ndarrays.
114148
*
@@ -408,6 +442,37 @@ interface Namespace {
408442
*/
409443
gdot: typeof gdot;
410444

445+
/**
446+
* Multiplies a one-dimensional ndarray by a scalar constant.
447+
*
448+
* ## Notes
449+
*
450+
* - The function expects the following ndarrays:
451+
*
452+
* - a one-dimensional input ndarray.
453+
* - a zero-dimensional ndarray containing a scalar constant.
454+
*
455+
* @param arrays - array-like object containing ndarrays
456+
* @returns input ndarray
457+
*
458+
* @example
459+
* var vector = require( '@stdlib/ndarray/vector/ctor' );
460+
* var scalar2ndarray = require( '@stdlib/ndarray/from-scalar' );
461+
*
462+
* var x = vector( [ 1.0, 2.0, 3.0, 4.0, 5.0 ], 'generic' );
463+
*
464+
* var alpha = scalar2ndarray( 5.0, {
465+
* 'dtype': 'generic'
466+
* });
467+
*
468+
* var y = ns.gscal( [ x, alpha ] );
469+
* // returns <ndarray>[ 5.0, 10.0, 15.0, 20.0, 25.0 ]
470+
*
471+
* var bool = ( y === x );
472+
* // returns true
473+
*/
474+
gscal: typeof gscal;
475+
411476
/**
412477
* Interchanges two one-dimensional ndarrays.
413478
*

lib/node_modules/@stdlib/blas/base/ndarray/lib/index.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -252,6 +252,15 @@ setReadOnly( ns, 'zaxpy', require( '@stdlib/blas/base/ndarray/zaxpy' ) );
252252
*/
253253
setReadOnly( ns, 'zcopy', require( '@stdlib/blas/base/ndarray/zcopy' ) );
254254

255+
/**
256+
* @name zscal
257+
* @memberof ns
258+
* @readonly
259+
* @type {Function}
260+
* @see {@link module:@stdlib/blas/base/ndarray/zscal}
261+
*/
262+
setReadOnly( ns, 'zscal', require( '@stdlib/blas/base/ndarray/zscal' ) );
263+
255264
/**
256265
* @name zswap
257266
* @memberof ns

0 commit comments

Comments
 (0)