Skip to content

Commit 90cb603

Browse files
committed
Auto-generated commit
1 parent 432809e commit 90cb603

File tree

13 files changed

+1332
-1
lines changed

13 files changed

+1332
-1
lines changed

CHANGELOG.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,14 @@
44
55
<section class="release" id="unreleased">
66

7-
## Unreleased (2025-07-13)
7+
## Unreleased (2025-07-27)
88

99
<section class="features">
1010

1111
### Features
1212

13+
- [`724d6be`](https://github.com/stdlib-js/stdlib/commit/724d6be1abb00700577700905dd847f6ab98812d) - add `array2ndarray` to namespace
14+
- [`485fd08`](https://github.com/stdlib-js/stdlib/commit/485fd086608ee3b2457da777a8a9d6f0dcd28d94) - add `ndarray/base/from-array`
1315
- [`76ea5a8`](https://github.com/stdlib-js/stdlib/commit/76ea5a8e8d964f78aa953ae4822345d3c1e3a6ae) - add missing tests to `ndarray/base/includes` [(#7304)](https://github.com/stdlib-js/stdlib/pull/7304)
1416
- [`f7c56f9`](https://github.com/stdlib-js/stdlib/commit/f7c56f9f6bdc0a64518d7ed0def31c9a3753b206) - add support for `float16`, `complex32`, `int64`, and `uint64` dtypes
1517
- [`d979fb3`](https://github.com/stdlib-js/stdlib/commit/d979fb33794fae5c14e2bbc78a77387ab8a407cb) - add support for `float16`, `complex32`, `int64`, and `uint64` dtypes
@@ -485,6 +487,8 @@ A total of 22 issues were closed in this release:
485487

486488
<details>
487489

490+
- [`724d6be`](https://github.com/stdlib-js/stdlib/commit/724d6be1abb00700577700905dd847f6ab98812d) - **feat:** add `array2ndarray` to namespace _(by Athan Reines)_
491+
- [`485fd08`](https://github.com/stdlib-js/stdlib/commit/485fd086608ee3b2457da777a8a9d6f0dcd28d94) - **feat:** add `ndarray/base/from-array` _(by Athan Reines)_
488492
- [`e4dd1ed`](https://github.com/stdlib-js/stdlib/commit/e4dd1ed8bf809ec7c8c34fd8c5dae03f5ed7cdf3) - **fix:** use correct name in package.json _(by Philipp Burckhardt)_
489493
- [`b8933b0`](https://github.com/stdlib-js/stdlib/commit/b8933b0c7fbabd051657132f49cb6eb603ad69db) - **docs:** fix return value description _(by Philipp Burckhardt)_
490494
- [`097c6fb`](https://github.com/stdlib-js/stdlib/commit/097c6fbd4f91e243d6c8a62f5e2abed0ee3d82df) - **chore:** fix C lint errors [(#7630)](https://github.com/stdlib-js/stdlib/pull/7630) _(by GeoDaoyu, Athan Reines)_

CONTRIBUTORS

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ Anshu Kumar <contact.anshukumar@protonmail.com>
3030
Anudeep Sanapala <anudeep0306@gmail.com>
3131
Arihant Pal <arihant0pal@gmail.com>
3232
Aryan Bhirud <112156883+AryanBhirud@users.noreply.github.com>
33+
AryanJ18 <18aryanj2006@gmail.com>
3334
Athan Reines <kgryte@gmail.com>
3435
Atharva Patil <124063987+atharva-patil-23@users.noreply.github.com>
3536
Ayaka <73595362+USERSATOSHI@users.noreply.github.com>
@@ -167,6 +168,7 @@ Sai Avinash <120403424+nasarobot@users.noreply.github.com>
167168
Sai Srikar Dumpeti <80447788+the-r3aper7@users.noreply.github.com>
168169
Sanchay Ketan Sinha <122982233+satansin123@users.noreply.github.com>
169170
Sarthak Paandey <145528240+SarthakPaandey@users.noreply.github.com>
171+
Satyajeet Chavan <chavansatyajeet2004@gmail.com>
170172
Saurabh Singh <saurabhsraghuvanshi@gmail.com>
171173
Seyyed Parsa Neshaei <spneshaei@users.noreply.github.com>
172174
Shabareesh Shetty <139731143+ShabiShett07@users.noreply.github.com>
@@ -176,6 +178,7 @@ Shivansh <114570926+shiv343@users.noreply.github.com>
176178
Shraddheya Shendre <shendreshraddheya@gmail.com>
177179
Shubh Mehta <93862397+Shubh942@users.noreply.github.com>
178180
Shubham Mishra <shubh622005@gmail.com>
181+
Siddhesh waje <117733253+siddhesh434@users.noreply.github.com>
179182
Sivam Das <100067002+Sivam2313@users.noreply.github.com>
180183
Snehil Shah <snehilshah.989@gmail.com>
181184
Soumajit Chatterjee <121816890+soumajit23@users.noreply.github.com>

base/from-array/README.md

Lines changed: 139 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,139 @@
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+
# array2ndarray
22+
23+
> Convert an array to a one-dimensional [ndarray][@stdlib/ndarray/base/ctor].
24+
25+
<!-- Section to include introductory text. Make sure to keep an empty line after the intro `section` element and another before the `/section` close. -->
26+
27+
<section class="intro">
28+
29+
</section>
30+
31+
<!-- /.intro -->
32+
33+
<!-- Package usage documentation. -->
34+
35+
<section class="usage">
36+
37+
## Usage
38+
39+
```javascript
40+
var array2ndarray = require( '@stdlib/ndarray/base/from-array' );
41+
```
42+
43+
#### array2ndarray( buf, order )
44+
45+
Returns a one-dimensional [ndarray][@stdlib/ndarray/base/ctor] which wraps a provided input array.
46+
47+
```javascript
48+
var x = array2ndarray( [ 1, 2, 3 ], 'row-major' );
49+
// returns <ndarray>
50+
51+
var sh = x.shape;
52+
// returns [ 3 ]
53+
54+
var dt = x.dtype;
55+
// returns 'generic'
56+
```
57+
58+
The function supports the following parameters:
59+
60+
- **buf**: input array.
61+
- **order**: memory [layout][@stdlib/ndarray/orders]. Must be either `'row-major'` or `'column-major'`.
62+
63+
</section>
64+
65+
<!-- /.usage -->
66+
67+
<!-- Package usage notes. Make sure to keep an empty line after the `section` element and another before the `/section` close. -->
68+
69+
<section class="notes">
70+
71+
</section>
72+
73+
<!-- /.notes -->
74+
75+
<!-- Package usage examples. -->
76+
77+
<section class="examples">
78+
79+
## Examples
80+
81+
<!-- eslint no-undef: "error" -->
82+
83+
```javascript
84+
var dtype = require( '@stdlib/ndarray/dtype' );
85+
var typedarray = require( '@stdlib/array/typed' );
86+
var array2ndarray = require( '@stdlib/ndarray/base/from-array' );
87+
88+
var buf = typedarray( 10, 'float64' );
89+
var x = array2ndarray( buf, 'row-major' );
90+
console.log( dtype( x ) );
91+
// => 'float64'
92+
93+
buf = typedarray( 10, 'int32' );
94+
x = array2ndarray( buf, 'row-major' );
95+
console.log( dtype( x ) );
96+
// => 'int32'
97+
98+
buf = typedarray( 10, 'complex128' );
99+
x = array2ndarray( buf, 'row-major' );
100+
console.log( dtype( x ) );
101+
// => 'complex128'
102+
103+
buf = typedarray( 10, 'bool' );
104+
x = array2ndarray( buf, 'row-major' );
105+
console.log( dtype( x ) );
106+
// => 'bool'
107+
```
108+
109+
</section>
110+
111+
<!-- /.examples -->
112+
113+
<!-- Section to include cited references. If references are included, add a horizontal rule *before* the section. Make sure to keep an empty line after the `section` element and another before the `/section` close. -->
114+
115+
<section class="references">
116+
117+
</section>
118+
119+
<!-- /.references -->
120+
121+
<!-- Section for related `stdlib` packages. Do not manually edit this section, as it is automatically populated. -->
122+
123+
<section class="related">
124+
125+
</section>
126+
127+
<!-- /.related -->
128+
129+
<!-- Section for all links. Make sure to keep an empty line after the `section` element and another before the `/section` close. -->
130+
131+
<section class="links">
132+
133+
[@stdlib/ndarray/base/ctor]: https://github.com/stdlib-js/ndarray/tree/main/base/ctor
134+
135+
[@stdlib/ndarray/orders]: https://github.com/stdlib-js/ndarray/tree/main/orders
136+
137+
</section>
138+
139+
<!-- /.links -->

0 commit comments

Comments
 (0)