Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit e8a3107

Browse filesBrowse files
committed
Release v0.1.0
1 parent 752eb0f commit e8a3107
Copy full SHA for e8a3107

File tree

6 files changed

+97
-39
lines changed
Filter options

6 files changed

+97
-39
lines changed

‎.editorconfig

Copy file name to clipboardExpand all lines: .editorconfig
+5Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,3 +179,8 @@ indent_size = 2
179179
[*.gypi]
180180
indent_style = space
181181
indent_size = 2
182+
183+
# Set properties for citation files:
184+
[*.{cff,cff.txt}]
185+
indent_style = space
186+
indent_size = 2

‎CITATION.cff

Copy file name to clipboard
+30Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
cff-version: 1.2.0
2+
title: stdlib
3+
message: >-
4+
If you use this software, please cite it using the
5+
metadata from this file.
6+
7+
type: software
8+
9+
authors:
10+
- name: The Stdlib Authors
11+
url: https://github.com/stdlib-js/stdlib/graphs/contributors
12+
13+
repository-code: https://github.com/stdlib-js/stdlib
14+
url: https://stdlib.io
15+
16+
abstract: |
17+
Standard library for JavaScript and Node.js.
18+
19+
keywords:
20+
- JavaScript
21+
- Node.js
22+
- TypeScript
23+
- standard library
24+
- scientific computing
25+
- numerical computing
26+
- statistical computing
27+
28+
license: Apache-2.0 AND BSL-1.0
29+
30+
date-released: 2016

‎README.md

Copy file name to clipboardExpand all lines: README.md
+13-2Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,17 @@ limitations under the License.
1818
1919
-->
2020

21+
22+
<details>
23+
<summary>
24+
About stdlib...
25+
</summary>
26+
<p>We believe in a future in which the web is a preferred environment for numerical computation. To help realize this future, we've built stdlib. stdlib is a standard library, with an emphasis on numerical and scientific computation, written in JavaScript (and C) for execution in browsers and in Node.js.</p>
27+
<p>The library is fully decomposable, being architected in such a way that you can swap out and mix and match APIs and functionality to cater to your exact preferences and use cases.</p>
28+
<p>When you use stdlib, you can be absolutely certain that you are using the most thorough, rigorous, well-written, studied, documented, tested, measured, and high-quality code out there.</p>
29+
<p>To join us in bringing numerical computing to the web, get started by checking us out on <a href="https://github.com/stdlib-js/stdlib">GitHub</a>, and please consider <a href="https://opencollective.com/stdlib">financially supporting stdlib</a>. We greatly appreciate your continued support!</p>
30+
</details>
31+
2132
# Multidimensional Arrays
2233

2334
[![NPM version][npm-image]][npm-url] [![Build Status][test-image]][test-url] [![Coverage Status][coverage-image]][coverage-url] <!-- [![dependencies][dependencies-image]][dependencies-url] -->
@@ -318,8 +329,8 @@ Copyright &copy; 2016-2023. The Stdlib [Authors][stdlib-authors].
318329
[npm-image]: http://img.shields.io/npm/v/@stdlib/ndarray-array.svg
319330
[npm-url]: https://npmjs.org/package/@stdlib/ndarray-array
320331

321-
[test-image]: https://github.com/stdlib-js/ndarray-array/actions/workflows/test.yml/badge.svg?branch=main
322-
[test-url]: https://github.com/stdlib-js/ndarray-array/actions/workflows/test.yml?query=branch:main
332+
[test-image]: https://github.com/stdlib-js/ndarray-array/actions/workflows/test.yml/badge.svg?branch=v0.1.0
333+
[test-url]: https://github.com/stdlib-js/ndarray-array/actions/workflows/test.yml?query=branch:v0.1.0
323334

324335
[coverage-image]: https://img.shields.io/codecov/c/github/stdlib-js/ndarray-array/main.svg
325336
[coverage-url]: https://codecov.io/github/stdlib-js/ndarray-array?branch=main

‎docs/types/index.d.ts

Copy file name to clipboardExpand all lines: docs/types/index.d.ts
+3-3Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
/// <reference types="@stdlib/types"/>
2222

2323
import { ArrayLike } from '@stdlib/types/array';
24-
import { DataType, ndarray, Mode, Order, Shape } from '@stdlib/types/ndarray';
24+
import { DataType, typedndarray, Mode, Order, Shape } from '@stdlib/types/ndarray';
2525

2626
/**
2727
* Interface defining function options.
@@ -164,7 +164,7 @@ interface ExtendedOptions extends Options {
164164
* var v = arr.get( 0 );
165165
* // returns [ 1, 2 ]
166166
*/
167-
declare function array( options: OptionsWithShape | OptionsWithBuffer ): ndarray; // tslint:disable-line:max-line-length
167+
declare function array<T = unknown>( options: OptionsWithShape | OptionsWithBuffer ): typedndarray<T>; // tslint:disable-line:no-unnecessary-generics
168168

169169
/**
170170
* Returns a multidimensional array.
@@ -220,7 +220,7 @@ declare function array( options: OptionsWithShape | OptionsWithBuffer ): ndarray
220220
* var v = arr.get( 0, 0 );
221221
* // returns 1.0
222222
*/
223-
declare function array( buffer: ArrayLike<any>, options?: ExtendedOptions ): ndarray; // tslint:disable-line:max-line-length
223+
declare function array<T = unknown>( buffer: ArrayLike<any>, options?: ExtendedOptions ): typedndarray<T>; // tslint:disable-line:no-unnecessary-generics
224224

225225

226226
// EXPORTS //

‎docs/types/test.ts

Copy file name to clipboardExpand all lines: docs/types/test.ts
+16-4Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,10 @@ import array = require( './index' );
2323

2424
// The function returns an ndarray...
2525
{
26-
array( [ [ 1, 2 ], [ 3, 4 ] ] ); // $ExpectType ndarray
27-
array( new Float64Array( [ 1.0, 2.0, 3.0, 4.0 ] ), { 'shape': [ 2, 2 ] } ); // $ExpectType ndarray
28-
array( { 'shape': [ 2, 2 ] } ); // $ExpectType ndarray
29-
array( { 'buffer': [ [ 1, 2 ], [ 3, 4 ] ] } ); // $ExpectType ndarray
26+
array<number>( [ [ 1, 2 ], [ 3, 4 ] ] ); // $ExpectType typedndarray<number>
27+
array<number>( new Float64Array( [ 1.0, 2.0, 3.0, 4.0 ] ), { 'shape': [ 2, 2 ] } ); // $ExpectType typedndarray<number>
28+
array<number>( { 'shape': [ 2, 2 ] } ); // $ExpectType typedndarray<number>
29+
array<number>( { 'buffer': [ [ 1, 2 ], [ 3, 4 ] ] } ); // $ExpectType typedndarray<number>
3030
}
3131

3232
// The compiler throws an error if the function is provided a first argument which is not an array, buffer, or options object...
@@ -41,6 +41,7 @@ import array = require( './index' );
4141
// The compiler throws an error if the function is provided a second argument which is not an options object...
4242
{
4343
const buffer = new Float64Array( [ 1.0, 2.0, 3.0, 4.0 ] );
44+
4445
array( buffer, 'abc' ); // $ExpectError
4546
array( buffer, true ); // $ExpectError
4647
array( buffer, false ); // $ExpectError
@@ -52,6 +53,7 @@ import array = require( './index' );
5253
// The compiler throws an error if the function is provided a `dtype` option which is not a recognized data type...
5354
{
5455
const buffer = new Float64Array( [ 1.0, 2.0, 3.0, 4.0 ] );
56+
5557
array( buffer, { 'dtype': 'abc' } ); // $ExpectError
5658
array( buffer, { 'dtype': 123 } ); // $ExpectError
5759
array( buffer, { 'dtype': true } ); // $ExpectError
@@ -74,6 +76,7 @@ import array = require( './index' );
7476
// The compiler throws an error if the function is provided an `order` option which is not a recognized order...
7577
{
7678
const buffer = new Float64Array( [ 1.0, 2.0, 3.0, 4.0 ] );
79+
7780
array( buffer, { 'order': 'abc' } ); // $ExpectError
7881
array( buffer, { 'order': 123 } ); // $ExpectError
7982
array( buffer, { 'order': true } ); // $ExpectError
@@ -96,6 +99,7 @@ import array = require( './index' );
9699
// The compiler throws an error if the function is provided a `shape` option which is not an array-like object containing numbers...
97100
{
98101
const buffer = new Float64Array( [ 1.0, 2.0, 3.0, 4.0 ] );
102+
99103
array( buffer, { 'shape': 'abc' } ); // $ExpectError
100104
array( buffer, { 'shape': 123 } ); // $ExpectError
101105
array( buffer, { 'shape': true } ); // $ExpectError
@@ -116,6 +120,7 @@ import array = require( './index' );
116120
// The compiler throws an error if the function is provided a `mode` option which is not a recognized mode...
117121
{
118122
const buffer = new Float64Array( [ 1.0, 2.0, 3.0, 4.0 ] );
123+
119124
array( buffer, { 'mode': 'abc' } ); // $ExpectError
120125
array( buffer, { 'mode': 123 } ); // $ExpectError
121126
array( buffer, { 'mode': true } ); // $ExpectError
@@ -138,6 +143,7 @@ import array = require( './index' );
138143
// The compiler throws an error if the function is provided an `submode` option which is not an array of strings...
139144
{
140145
const buffer = new Float64Array( [ 1.0, 2.0, 3.0, 4.0 ] );
146+
141147
array( buffer, { 'submode': 'abc' } ); // $ExpectError
142148
array( buffer, { 'submode': 123 } ); // $ExpectError
143149
array( buffer, { 'submode': true } ); // $ExpectError
@@ -158,6 +164,7 @@ import array = require( './index' );
158164
// The compiler throws an error if the function is provided a `copy` option which is not a boolean...
159165
{
160166
const buffer = new Float64Array( [ 1.0, 2.0, 3.0, 4.0 ] );
167+
161168
array( buffer, { 'copy': 'abc' } ); // $ExpectError
162169
array( buffer, { 'copy': 123 } ); // $ExpectError
163170
array( buffer, { 'copy': null } ); // $ExpectError
@@ -176,6 +183,7 @@ import array = require( './index' );
176183
// The compiler throws an error if the function is provided a `flatten` option which is not a boolean...
177184
{
178185
const buffer = new Float64Array( [ 1.0, 2.0, 3.0, 4.0 ] );
186+
179187
array( buffer, { 'flatten': 'abc' } ); // $ExpectError
180188
array( buffer, { 'flatten': 123 } ); // $ExpectError
181189
array( buffer, { 'flatten': null } ); // $ExpectError
@@ -194,6 +202,7 @@ import array = require( './index' );
194202
// The compiler throws an error if the function is provided a `ndmin` option which is not a number...
195203
{
196204
const buffer = new Float64Array( [ 1.0, 2.0, 3.0, 4.0 ] );
205+
197206
array( buffer, { 'ndmin': 'abc' } ); // $ExpectError
198207
array( buffer, { 'ndmin': false } ); // $ExpectError
199208
array( buffer, { 'ndmin': true } ); // $ExpectError
@@ -214,6 +223,7 @@ import array = require( './index' );
214223
// The compiler throws an error if the function is provided a `casting` option which is not a string...
215224
{
216225
const buffer = new Float64Array( [ 1.0, 2.0, 3.0, 4.0 ] );
226+
217227
array( buffer, { 'casting': 123 } ); // $ExpectError
218228
array( buffer, { 'casting': false } ); // $ExpectError
219229
array( buffer, { 'casting': true } ); // $ExpectError
@@ -234,6 +244,7 @@ import array = require( './index' );
234244
// The compiler throws an error if the function is provided a `readonly` option which is not a boolean...
235245
{
236246
const buffer = new Float64Array( [ 1.0, 2.0, 3.0, 4.0 ] );
247+
237248
array( buffer, { 'readonly': 'abc' } ); // $ExpectError
238249
array( buffer, { 'readonly': 123 } ); // $ExpectError
239250
array( buffer, { 'readonly': null } ); // $ExpectError
@@ -252,6 +263,7 @@ import array = require( './index' );
252263
// The compiler throws an error if the function is provided an invalid number of arguments...
253264
{
254265
const buffer = new Float64Array( [ 1.0, 2.0, 3.0, 4.0 ] );
266+
255267
array(); // $ExpectError
256268
array( buffer, {}, {} ); // $ExpectError
257269
}

‎package.json

Copy file name to clipboardExpand all lines: package.json
+30-30Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@stdlib/ndarray-array",
3-
"version": "0.0.9",
3+
"version": "0.1.0",
44
"description": "Multidimensional arrays.",
55
"license": "Apache-2.0",
66
"author": {
@@ -37,37 +37,37 @@
3737
"url": "https://github.com/stdlib-js/stdlib/issues"
3838
},
3939
"dependencies": {
40-
"@stdlib/array-base-flatten": "^0.0.1",
41-
"@stdlib/array-shape": "^0.0.6",
42-
"@stdlib/assert-has-own-property": "^0.0.7",
43-
"@stdlib/assert-is-array": "^0.0.7",
44-
"@stdlib/assert-is-boolean": "^0.0.8",
45-
"@stdlib/assert-is-ndarray-like": "^0.0.6",
46-
"@stdlib/assert-is-nonnegative-integer": "^0.0.7",
47-
"@stdlib/assert-is-plain-object": "^0.0.7",
48-
"@stdlib/buffer-alloc-unsafe": "^0.0.7",
49-
"@stdlib/constants-float64-pinf": "^0.0.8",
50-
"@stdlib/math-base-assert-is-integer": "^0.0.7",
51-
"@stdlib/math-base-special-abs": "^0.0.6",
52-
"@stdlib/ndarray-base-assert-is-allowed-data-type-cast": "^0.0.9",
53-
"@stdlib/ndarray-base-assert-is-casting-mode": "^0.0.7",
54-
"@stdlib/ndarray-base-assert-is-data-type": "^0.0.8",
55-
"@stdlib/ndarray-base-assert-is-order": "^0.0.7",
56-
"@stdlib/ndarray-base-buffer": "^0.0.6",
57-
"@stdlib/ndarray-base-buffer-ctors": "^0.0.6",
58-
"@stdlib/ndarray-base-buffer-dtype": "^0.0.6",
59-
"@stdlib/ndarray-base-numel": "^0.0.8",
60-
"@stdlib/ndarray-base-shape2strides": "^0.0.8",
61-
"@stdlib/ndarray-base-strides2offset": "^0.0.8",
62-
"@stdlib/ndarray-base-strides2order": "^0.0.6",
63-
"@stdlib/ndarray-ctor": "^0.0.10",
64-
"@stdlib/ndarray-defaults": "github:stdlib-js/ndarray-defaults#main",
65-
"@stdlib/string-format": "^0.0.3",
66-
"@stdlib/types": "^0.0.14"
40+
"@stdlib/array-base-flatten": "^0.1.0",
41+
"@stdlib/array-shape": "^0.1.0",
42+
"@stdlib/assert-has-own-property": "^0.1.0",
43+
"@stdlib/assert-is-array": "^0.1.0",
44+
"@stdlib/assert-is-boolean": "^0.1.0",
45+
"@stdlib/assert-is-ndarray-like": "^0.1.0",
46+
"@stdlib/assert-is-nonnegative-integer": "^0.1.0",
47+
"@stdlib/assert-is-plain-object": "^0.1.0",
48+
"@stdlib/buffer-alloc-unsafe": "^0.1.0",
49+
"@stdlib/constants-float64-pinf": "^0.1.0",
50+
"@stdlib/math-base-assert-is-integer": "^0.1.0",
51+
"@stdlib/math-base-special-abs": "^0.1.0",
52+
"@stdlib/ndarray-base-assert-is-allowed-data-type-cast": "^0.1.0",
53+
"@stdlib/ndarray-base-assert-is-casting-mode": "^0.1.0",
54+
"@stdlib/ndarray-base-assert-is-data-type": "^0.1.0",
55+
"@stdlib/ndarray-base-assert-is-order": "^0.1.0",
56+
"@stdlib/ndarray-base-buffer": "^0.1.0",
57+
"@stdlib/ndarray-base-buffer-ctors": "^0.1.0",
58+
"@stdlib/ndarray-base-buffer-dtype": "^0.1.0",
59+
"@stdlib/ndarray-base-numel": "^0.1.0",
60+
"@stdlib/ndarray-base-shape2strides": "^0.1.0",
61+
"@stdlib/ndarray-base-strides2offset": "^0.1.0",
62+
"@stdlib/ndarray-base-strides2order": "^0.1.0",
63+
"@stdlib/ndarray-ctor": "^0.1.0",
64+
"@stdlib/ndarray-defaults": "^0.1.0",
65+
"@stdlib/string-format": "^0.1.0",
66+
"@stdlib/types": "^0.1.0"
6767
},
6868
"devDependencies": {
69-
"@stdlib/array-float32": "^0.0.6",
70-
"@stdlib/bench": "^0.0.12",
69+
"@stdlib/array-float32": "^0.1.0",
70+
"@stdlib/bench": "^0.1.0",
7171
"tape": "git+https://github.com/kgryte/tape.git#fix/globby",
7272
"istanbul": "^0.4.1",
7373
"tap-min": "git+https://github.com/Planeshifter/tap-min.git"

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.