Skip to content

Commit 84cc466

Browse files
committed
Auto-generated commit
1 parent 794e842 commit 84cc466

12 files changed

Lines changed: 1245 additions & 1 deletion

File tree

CHANGELOG.md

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
<section class="release" id="unreleased">
66

7-
## Unreleased (2025-04-03)
7+
## Unreleased (2025-04-09)
88

99
<section class="packages">
1010

@@ -1074,6 +1074,28 @@ This release closes the following issue:
10741074

10751075
<!-- /.package -->
10761076

1077+
<section class="package" id="array-base-reshape-unreleased">
1078+
1079+
#### [@stdlib/array/base/reshape](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/reshape)
1080+
1081+
<details>
1082+
1083+
<section class="features">
1084+
1085+
##### Features
1086+
1087+
- [`40de89d`](https://github.com/stdlib-js/stdlib/commit/40de89d0b84ab345f198d6a90696c0762efde887) - add `array/base/reshape` [(#5639)](https://github.com/stdlib-js/stdlib/pull/5639)
1088+
1089+
</section>
1090+
1091+
<!-- /.features -->
1092+
1093+
</details>
1094+
1095+
</section>
1096+
1097+
<!-- /.package -->
1098+
10771099
<section class="package" id="array-base-scatter-filled-unreleased">
10781100

10791101
#### [@stdlib/array/base/scatter-filled](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/scatter-filled)
@@ -1627,6 +1649,7 @@ A total of 14 people contributed to this release. Thank you to the following con
16271649

16281650
<details>
16291651

1652+
- [`40de89d`](https://github.com/stdlib-js/stdlib/commit/40de89d0b84ab345f198d6a90696c0762efde887) - **feat:** add `array/base/reshape` [(#5639)](https://github.com/stdlib-js/stdlib/pull/5639) _(by Muhammad Haris, Athan Reines)_
16301653
- [`54534dd`](https://github.com/stdlib-js/stdlib/commit/54534ddb74b35d0b99915f8017ed9d9e692a7502) - **chore:** address commit comments [(#5978)](https://github.com/stdlib-js/stdlib/pull/5978) _(by Jay Soni, Athan Reines, stdlib-bot)_
16311654
- [`e28064f`](https://github.com/stdlib-js/stdlib/commit/e28064f9d93a232d82297842a9a4bd2895952a55) - **docs:** update namespace TypeScript declarations [(#6478)](https://github.com/stdlib-js/stdlib/pull/6478) _(by stdlib-bot)_
16321655
- [`f2c38e2`](https://github.com/stdlib-js/stdlib/commit/f2c38e218661b2aa21fe58bf2e56ed7c57c2e013) - **docs:** update namespace table of contents [(#6480)](https://github.com/stdlib-js/stdlib/pull/6480) _(by stdlib-bot)_

CONTRIBUTORS

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ Dev Goel <135586571+corsairier@users.noreply.github.com>
4343
Dhanyabad behera <110620935+dhanyabad11@users.noreply.github.com>
4444
Dhruv Arvind Singh <154677013+DhruvArvindSingh@users.noreply.github.com>
4545
Dhruvil Mehta <68022411+dhruvilmehta@users.noreply.github.com>
46+
Dipjyoti Das <126075231+dipexplorer@users.noreply.github.com>
4647
Divyansh Seth <59174836+sethdivyansh@users.noreply.github.com>
4748
Dominic Lim <46486515+domlimm@users.noreply.github.com>
4849
Dominik Moritz <domoritz@gmail.com>
@@ -76,6 +77,7 @@ Joris Labie <joris.labie1@gmail.com>
7677
Justin Dennison <justin1dennison@gmail.com>
7778
Justyn Shelby <96994781+ShelbyJustyn@users.noreply.github.com>
7879
Karan Anand <anandkarancompsci@gmail.com>
80+
Karan Yadav <77043443+karanBRAVO@users.noreply.github.com>
7981
Karthik Prakash <116057817+skoriop@users.noreply.github.com>
8082
Kaushikgtm <162317291+Kaushikgtm@users.noreply.github.com>
8183
Kavyansh-Bagdi <153486713+Kavyansh-Bagdi@users.noreply.github.com>
@@ -95,6 +97,8 @@ Mohammad Bin Aftab <48010758+MohammadBinAftab@users.noreply.github.com>
9597
Mohammad Kaif <mdkaifprofession@gmail.com>
9698
Momtchil Momtchev <momtchil@momtchev.com>
9799
Muhammad Haris <harriskhan047@outlook.com>
100+
Muhammad Taaha Tariq <166188821+Taaha-Tariq@users.noreply.github.com>
101+
Muhmmad Saad <106260977+saad-imran-dev@users.noreply.github.com>
98102
Naresh Jagadeesan <naresh.naresh000@gmail.com>
99103
Naveen Kumar <stupiddint@gmail.com>
100104
Neeraj Pathak <neerajrpathak710@gmail.com>
@@ -112,6 +116,7 @@ Prajwal Kulkarni <prajwalkulkarni76@gmail.com>
112116
Pranav Goswami <pranavchiku11@gmail.com>
113117
Pranjal Jha <97080887+PraneGIT@users.noreply.github.com>
114118
Prashant Kumar Yadav <144602492+0PrashantYadav0@users.noreply.github.com>
119+
PrathamBhamare <164445568+PrathamBhamare@users.noreply.github.com>
115120
Pratik Singh <97464067+Pratik772846@users.noreply.github.com>
116121
Pratyush Kumar Chouhan <pratyushkumar0308@gmail.com>
117122
Priyansh Prajapati <88396544+itsspriyansh@users.noreply.github.com>
@@ -127,6 +132,7 @@ Rishav <115060907+rishav2404@users.noreply.github.com>
127132
Rishav Tarway <rishavtarway@gmail.com>
128133
Robert Gislason <gztown2216@yahoo.com>
129134
Roman Stetsyk <25715951+romanstetsyk@users.noreply.github.com>
135+
Rupa <102663541+Rupa-Rd@users.noreply.github.com>
130136
Rutam Kathale <138517416+performant23@users.noreply.github.com>
131137
Ruthwik Chikoti <145591715+ruthwikchikoti@users.noreply.github.com>
132138
Ryan Seal <splrk@users.noreply.github.com>

base/reshape/README.md

Lines changed: 122 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,122 @@
1+
<!--
2+
3+
@license Apache-2.0
4+
5+
Copyright (c) 2025 The Stdlib Authors.
6+
7+
Licensed under the Apache License, Version 2.0 (the "License");
8+
you may not use this file except in compliance with the License.
9+
You may obtain a copy of the License at
10+
11+
http://www.apache.org/licenses/LICENSE-2.0
12+
13+
Unless required by applicable law or agreed to in writing, software
14+
distributed under the License is distributed on an "AS IS" BASIS,
15+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16+
See the License for the specific language governing permissions and
17+
limitations under the License.
18+
19+
-->
20+
21+
# reshape
22+
23+
> Reshape a nested array into another nested array having a desired shape.
24+
25+
<section class="usage">
26+
27+
## Usage
28+
29+
```javascript
30+
var reshape = require( '@stdlib/array/base/reshape' );
31+
```
32+
33+
#### reshape( x, fromShape, toShape, colexicographic )
34+
35+
Reshapes a nested array into another nested array having a desired shape.
36+
37+
```javascript
38+
var x = [ [ 1, 2, 3 ], [ 4, 5, 6 ] ];
39+
40+
var out = reshape( x, [ 2, 3 ], [ 3, 2 ], false );
41+
// returns [ [ 1, 2 ], [ 3, 4 ], [ 5, 6 ] ]
42+
```
43+
44+
- **x**: input array.
45+
- **fromShape**: input array shape.
46+
- **toShape**: output array shape.
47+
- **colexicographic**: boolean indicating whether to reshape the array in colexicographic order.
48+
49+
To reshape in colexicographic order, set the `colexicographic` argument to `true`.
50+
51+
```javascript
52+
var x = [ [ 1, 2, 3 ], [ 4, 5, 6 ] ];
53+
54+
var out = reshape( x, [ 2, 3 ], [ 3, 2 ], true );
55+
// [ [ 1, 4 ], [ 2, 5 ], [ 3, 6 ] ]
56+
```
57+
58+
</section>
59+
60+
<!-- /.usage -->
61+
62+
<section class="notes">
63+
64+
## Notes
65+
66+
- The function assumes that `fromShape` and `toShape` describe arrays having the same number of elements.
67+
68+
</section>
69+
70+
<!-- /.notes -->
71+
72+
<section class="examples">
73+
74+
## Examples
75+
76+
<!-- eslint no-undef: "error" -->
77+
78+
```javascript
79+
var reshape = require( '@stdlib/array/base/reshape' );
80+
81+
var x = [
82+
[ 1, 2, 3, 4 ],
83+
[ 5, 6, 7, 8 ],
84+
[ 9, 10, 11, 12 ]
85+
];
86+
87+
var out = reshape( x, [ 3, 4 ], [ 4, 3 ], false );
88+
// returns [ [ 1, 2, 3 ], [ 4, 5, 6 ], [ 7, 8, 9 ], [ 10, 11, 12 ] ]
89+
90+
out = reshape( x, [ 3, 4 ], [ 6, 2 ], false );
91+
// returns [ [ 1, 2 ], [ 3, 4 ], [ 5, 6 ], [ 7, 8 ], [ 9, 10 ], [ 11, 12 ] ]
92+
93+
out = reshape( x, [ 3, 4 ], [ 1, 12 ], false );
94+
// returns [ [ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 ] ]
95+
96+
out = reshape( x, [ 3, 4 ], [ 12, 1 ], false );
97+
// returns [ [ 1 ], [ 2 ], [ 3 ], [ 4 ], [ 5 ], [ 6 ], [ 7 ], [ 8 ], [ 9 ], [ 10 ], [ 11 ], [ 12 ] ]
98+
```
99+
100+
</section>
101+
102+
<!-- /.examples -->
103+
104+
<!-- Section for related `stdlib` packages. Do not manually edit this section, as it is automatically populated. -->
105+
106+
<section class="related">
107+
108+
</section>
109+
110+
<!-- /.related -->
111+
112+
<!-- Section for all links. Make sure to keep an empty line after the `section` element and another before the `/section` close. -->
113+
114+
<section class="links">
115+
116+
<!-- <related-links> -->
117+
118+
<!-- </related-links> -->
119+
120+
</section>
121+
122+
<!-- /.links -->

0 commit comments

Comments
 (0)