Skip to content

Commit 85fe99e

Browse files
committed
Auto-generated commit
1 parent 00744be commit 85fe99e

3 files changed

Lines changed: 6 additions & 4 deletions

File tree

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020

2121
### Bug Fixes
2222

23+
- [`4e89875`](https://github.com/stdlib-js/stdlib/commit/4e898755cf98f6e3b8d8c24079fb9ea7730f2d9c) - preserve input ndarray type in `ndarray/base/maybe-broadcast-array-except-dimensions` [(#12629)](https://github.com/stdlib-js/stdlib/pull/12629)
2324
- [`95016b8`](https://github.com/stdlib-js/stdlib/commit/95016b8c7179f978fb8ef5b272cff36b523e06e6) - add missing import in `ndarray/base/unflatten` declarations [(#12625)](https://github.com/stdlib-js/stdlib/pull/12625)
2425

2526
</section>
@@ -32,6 +33,7 @@
3233

3334
<details>
3435

36+
- [`4e89875`](https://github.com/stdlib-js/stdlib/commit/4e898755cf98f6e3b8d8c24079fb9ea7730f2d9c) - **fix:** preserve input ndarray type in `ndarray/base/maybe-broadcast-array-except-dimensions` [(#12629)](https://github.com/stdlib-js/stdlib/pull/12629) _(by Philipp Burckhardt, Athan Reines)_
3537
- [`95016b8`](https://github.com/stdlib-js/stdlib/commit/95016b8c7179f978fb8ef5b272cff36b523e06e6) - **fix:** add missing import in `ndarray/base/unflatten` declarations [(#12625)](https://github.com/stdlib-js/stdlib/pull/12625) _(by Philipp Burckhardt, Athan Reines)_
3638
- [`3116666`](https://github.com/stdlib-js/stdlib/commit/3116666b3e530b2e6fb161924ae4c43cdf02905b) - **docs:** correct TSDoc across `ndarray` TypeScript declarations [(#12635)](https://github.com/stdlib-js/stdlib/pull/12635) _(by Philipp Burckhardt, Athan Reines)_
3739
- [`727a69c`](https://github.com/stdlib-js/stdlib/commit/727a69cb34991e322acd1fc76c828a7243faf96f) - **refactor:** remove redundant overload in `ndarray/base/transpose` [(#12632)](https://github.com/stdlib-js/stdlib/pull/12632) _(by Philipp Burckhardt)_

base/maybe-broadcast-array-except-dimensions/docs/types/index.d.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,11 @@
2020

2121
/// <reference types="@stdlib/types"/>
2222

23-
import { ArrayLike } from '@stdlib/types/array';
23+
import { Collection } from '@stdlib/types/array';
2424
import { ndarray } from '@stdlib/types/ndarray';
2525

2626
/**
27-
* Broadcasts an ndarray to a specified shape if and only if the specified shape differs from the provided ndarray's shape.
27+
* Broadcasts an ndarray to a specified shape while keeping a list of specified dimensions unchanged if and only if the specified shape differs from the provided ndarray's shape.
2828
*
2929
* ## Notes
3030
*
@@ -53,7 +53,7 @@ import { ndarray } from '@stdlib/types/ndarray';
5353
* var y = maybeBroadcastArrayExceptDimensions( x, [ 2, 2, 3 ], [ -2 ] );
5454
* // returns <ndarray>[ [ [ 1, 2, 3 ] ], [ [ 1, 2, 3 ] ] ]
5555
*/
56-
declare function maybeBroadcastArrayExceptDimensions( arr: ndarray, shape: ArrayLike<number>, dims: ArrayLike<number> ): ndarray;
56+
declare function maybeBroadcastArrayExceptDimensions<T extends ndarray>( arr: T, shape: Collection<number>, dims: Collection<number> ): T;
5757

5858

5959
// EXPORTS //

base/maybe-broadcast-array-except-dimensions/docs/types/test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ import maybeBroadcastArrayExceptDimensions = require( './index' );
2828
{
2929
const x = zeros( [ 2, 2 ] );
3030

31-
maybeBroadcastArrayExceptDimensions( x, [ 2, 2, 2 ], [ -2 ] ); // $ExpectType ndarray
31+
maybeBroadcastArrayExceptDimensions( x, [ 2, 2, 2 ], [ -2 ] ); // $ExpectType float64ndarray
3232
}
3333

3434
// The compiler throws an error if the function is not provided a first argument which is an ndarray...

0 commit comments

Comments
 (0)