From e8a310794cd80c794751e9feb086ce073ad28d51 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sun, 24 Sep 2023 17:50:00 +0000 Subject: [PATCH] Release v0.1.0 --- .editorconfig | 5 ++++ CITATION.cff | 30 ++++++++++++++++++++++ README.md | 15 +++++++++-- docs/types/index.d.ts | 6 ++--- docs/types/test.ts | 20 ++++++++++++--- package.json | 60 +++++++++++++++++++++---------------------- 6 files changed, 97 insertions(+), 39 deletions(-) create mode 100644 CITATION.cff diff --git a/.editorconfig b/.editorconfig index 0fd4d6c..13e9c39 100644 --- a/.editorconfig +++ b/.editorconfig @@ -179,3 +179,8 @@ indent_size = 2 [*.gypi] indent_style = space indent_size = 2 + +# Set properties for citation files: +[*.{cff,cff.txt}] +indent_style = space +indent_size = 2 diff --git a/CITATION.cff b/CITATION.cff new file mode 100644 index 0000000..2ec6fff --- /dev/null +++ b/CITATION.cff @@ -0,0 +1,30 @@ +cff-version: 1.2.0 +title: stdlib +message: >- + If you use this software, please cite it using the + metadata from this file. + +type: software + +authors: + - name: The Stdlib Authors + url: https://github.com/stdlib-js/stdlib/graphs/contributors + +repository-code: https://github.com/stdlib-js/stdlib +url: https://stdlib.io + +abstract: | + Standard library for JavaScript and Node.js. + +keywords: + - JavaScript + - Node.js + - TypeScript + - standard library + - scientific computing + - numerical computing + - statistical computing + +license: Apache-2.0 AND BSL-1.0 + +date-released: 2016 diff --git a/README.md b/README.md index d95fb49..07d7a5b 100644 --- a/README.md +++ b/README.md @@ -18,6 +18,17 @@ limitations under the License. --> + +
+ + About stdlib... + +

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.

+

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.

+

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.

+

To join us in bringing numerical computing to the web, get started by checking us out on GitHub, and please consider financially supporting stdlib. We greatly appreciate your continued support!

+
+ # Multidimensional Arrays [![NPM version][npm-image]][npm-url] [![Build Status][test-image]][test-url] [![Coverage Status][coverage-image]][coverage-url] @@ -318,8 +329,8 @@ Copyright © 2016-2023. The Stdlib [Authors][stdlib-authors]. [npm-image]: http://img.shields.io/npm/v/@stdlib/ndarray-array.svg [npm-url]: https://npmjs.org/package/@stdlib/ndarray-array -[test-image]: https://github.com/stdlib-js/ndarray-array/actions/workflows/test.yml/badge.svg?branch=main -[test-url]: https://github.com/stdlib-js/ndarray-array/actions/workflows/test.yml?query=branch:main +[test-image]: https://github.com/stdlib-js/ndarray-array/actions/workflows/test.yml/badge.svg?branch=v0.1.0 +[test-url]: https://github.com/stdlib-js/ndarray-array/actions/workflows/test.yml?query=branch:v0.1.0 [coverage-image]: https://img.shields.io/codecov/c/github/stdlib-js/ndarray-array/main.svg [coverage-url]: https://codecov.io/github/stdlib-js/ndarray-array?branch=main diff --git a/docs/types/index.d.ts b/docs/types/index.d.ts index a714e50..25c7ccf 100644 --- a/docs/types/index.d.ts +++ b/docs/types/index.d.ts @@ -21,7 +21,7 @@ /// import { ArrayLike } from '@stdlib/types/array'; -import { DataType, ndarray, Mode, Order, Shape } from '@stdlib/types/ndarray'; +import { DataType, typedndarray, Mode, Order, Shape } from '@stdlib/types/ndarray'; /** * Interface defining function options. @@ -164,7 +164,7 @@ interface ExtendedOptions extends Options { * var v = arr.get( 0 ); * // returns [ 1, 2 ] */ -declare function array( options: OptionsWithShape | OptionsWithBuffer ): ndarray; // tslint:disable-line:max-line-length +declare function array( options: OptionsWithShape | OptionsWithBuffer ): typedndarray; // tslint:disable-line:no-unnecessary-generics /** * Returns a multidimensional array. @@ -220,7 +220,7 @@ declare function array( options: OptionsWithShape | OptionsWithBuffer ): ndarray * var v = arr.get( 0, 0 ); * // returns 1.0 */ -declare function array( buffer: ArrayLike, options?: ExtendedOptions ): ndarray; // tslint:disable-line:max-line-length +declare function array( buffer: ArrayLike, options?: ExtendedOptions ): typedndarray; // tslint:disable-line:no-unnecessary-generics // EXPORTS // diff --git a/docs/types/test.ts b/docs/types/test.ts index 042a95c..b58b3d7 100644 --- a/docs/types/test.ts +++ b/docs/types/test.ts @@ -23,10 +23,10 @@ import array = require( './index' ); // The function returns an ndarray... { - array( [ [ 1, 2 ], [ 3, 4 ] ] ); // $ExpectType ndarray - array( new Float64Array( [ 1.0, 2.0, 3.0, 4.0 ] ), { 'shape': [ 2, 2 ] } ); // $ExpectType ndarray - array( { 'shape': [ 2, 2 ] } ); // $ExpectType ndarray - array( { 'buffer': [ [ 1, 2 ], [ 3, 4 ] ] } ); // $ExpectType ndarray + array( [ [ 1, 2 ], [ 3, 4 ] ] ); // $ExpectType typedndarray + array( new Float64Array( [ 1.0, 2.0, 3.0, 4.0 ] ), { 'shape': [ 2, 2 ] } ); // $ExpectType typedndarray + array( { 'shape': [ 2, 2 ] } ); // $ExpectType typedndarray + array( { 'buffer': [ [ 1, 2 ], [ 3, 4 ] ] } ); // $ExpectType typedndarray } // 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' ); // The compiler throws an error if the function is provided a second argument which is not an options object... { const buffer = new Float64Array( [ 1.0, 2.0, 3.0, 4.0 ] ); + array( buffer, 'abc' ); // $ExpectError array( buffer, true ); // $ExpectError array( buffer, false ); // $ExpectError @@ -52,6 +53,7 @@ import array = require( './index' ); // The compiler throws an error if the function is provided a `dtype` option which is not a recognized data type... { const buffer = new Float64Array( [ 1.0, 2.0, 3.0, 4.0 ] ); + array( buffer, { 'dtype': 'abc' } ); // $ExpectError array( buffer, { 'dtype': 123 } ); // $ExpectError array( buffer, { 'dtype': true } ); // $ExpectError @@ -74,6 +76,7 @@ import array = require( './index' ); // The compiler throws an error if the function is provided an `order` option which is not a recognized order... { const buffer = new Float64Array( [ 1.0, 2.0, 3.0, 4.0 ] ); + array( buffer, { 'order': 'abc' } ); // $ExpectError array( buffer, { 'order': 123 } ); // $ExpectError array( buffer, { 'order': true } ); // $ExpectError @@ -96,6 +99,7 @@ import array = require( './index' ); // The compiler throws an error if the function is provided a `shape` option which is not an array-like object containing numbers... { const buffer = new Float64Array( [ 1.0, 2.0, 3.0, 4.0 ] ); + array( buffer, { 'shape': 'abc' } ); // $ExpectError array( buffer, { 'shape': 123 } ); // $ExpectError array( buffer, { 'shape': true } ); // $ExpectError @@ -116,6 +120,7 @@ import array = require( './index' ); // The compiler throws an error if the function is provided a `mode` option which is not a recognized mode... { const buffer = new Float64Array( [ 1.0, 2.0, 3.0, 4.0 ] ); + array( buffer, { 'mode': 'abc' } ); // $ExpectError array( buffer, { 'mode': 123 } ); // $ExpectError array( buffer, { 'mode': true } ); // $ExpectError @@ -138,6 +143,7 @@ import array = require( './index' ); // The compiler throws an error if the function is provided an `submode` option which is not an array of strings... { const buffer = new Float64Array( [ 1.0, 2.0, 3.0, 4.0 ] ); + array( buffer, { 'submode': 'abc' } ); // $ExpectError array( buffer, { 'submode': 123 } ); // $ExpectError array( buffer, { 'submode': true } ); // $ExpectError @@ -158,6 +164,7 @@ import array = require( './index' ); // The compiler throws an error if the function is provided a `copy` option which is not a boolean... { const buffer = new Float64Array( [ 1.0, 2.0, 3.0, 4.0 ] ); + array( buffer, { 'copy': 'abc' } ); // $ExpectError array( buffer, { 'copy': 123 } ); // $ExpectError array( buffer, { 'copy': null } ); // $ExpectError @@ -176,6 +183,7 @@ import array = require( './index' ); // The compiler throws an error if the function is provided a `flatten` option which is not a boolean... { const buffer = new Float64Array( [ 1.0, 2.0, 3.0, 4.0 ] ); + array( buffer, { 'flatten': 'abc' } ); // $ExpectError array( buffer, { 'flatten': 123 } ); // $ExpectError array( buffer, { 'flatten': null } ); // $ExpectError @@ -194,6 +202,7 @@ import array = require( './index' ); // The compiler throws an error if the function is provided a `ndmin` option which is not a number... { const buffer = new Float64Array( [ 1.0, 2.0, 3.0, 4.0 ] ); + array( buffer, { 'ndmin': 'abc' } ); // $ExpectError array( buffer, { 'ndmin': false } ); // $ExpectError array( buffer, { 'ndmin': true } ); // $ExpectError @@ -214,6 +223,7 @@ import array = require( './index' ); // The compiler throws an error if the function is provided a `casting` option which is not a string... { const buffer = new Float64Array( [ 1.0, 2.0, 3.0, 4.0 ] ); + array( buffer, { 'casting': 123 } ); // $ExpectError array( buffer, { 'casting': false } ); // $ExpectError array( buffer, { 'casting': true } ); // $ExpectError @@ -234,6 +244,7 @@ import array = require( './index' ); // The compiler throws an error if the function is provided a `readonly` option which is not a boolean... { const buffer = new Float64Array( [ 1.0, 2.0, 3.0, 4.0 ] ); + array( buffer, { 'readonly': 'abc' } ); // $ExpectError array( buffer, { 'readonly': 123 } ); // $ExpectError array( buffer, { 'readonly': null } ); // $ExpectError @@ -252,6 +263,7 @@ import array = require( './index' ); // The compiler throws an error if the function is provided an invalid number of arguments... { const buffer = new Float64Array( [ 1.0, 2.0, 3.0, 4.0 ] ); + array(); // $ExpectError array( buffer, {}, {} ); // $ExpectError } diff --git a/package.json b/package.json index d4a7022..08efc8c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@stdlib/ndarray-array", - "version": "0.0.9", + "version": "0.1.0", "description": "Multidimensional arrays.", "license": "Apache-2.0", "author": { @@ -37,37 +37,37 @@ "url": "https://github.com/stdlib-js/stdlib/issues" }, "dependencies": { - "@stdlib/array-base-flatten": "^0.0.1", - "@stdlib/array-shape": "^0.0.6", - "@stdlib/assert-has-own-property": "^0.0.7", - "@stdlib/assert-is-array": "^0.0.7", - "@stdlib/assert-is-boolean": "^0.0.8", - "@stdlib/assert-is-ndarray-like": "^0.0.6", - "@stdlib/assert-is-nonnegative-integer": "^0.0.7", - "@stdlib/assert-is-plain-object": "^0.0.7", - "@stdlib/buffer-alloc-unsafe": "^0.0.7", - "@stdlib/constants-float64-pinf": "^0.0.8", - "@stdlib/math-base-assert-is-integer": "^0.0.7", - "@stdlib/math-base-special-abs": "^0.0.6", - "@stdlib/ndarray-base-assert-is-allowed-data-type-cast": "^0.0.9", - "@stdlib/ndarray-base-assert-is-casting-mode": "^0.0.7", - "@stdlib/ndarray-base-assert-is-data-type": "^0.0.8", - "@stdlib/ndarray-base-assert-is-order": "^0.0.7", - "@stdlib/ndarray-base-buffer": "^0.0.6", - "@stdlib/ndarray-base-buffer-ctors": "^0.0.6", - "@stdlib/ndarray-base-buffer-dtype": "^0.0.6", - "@stdlib/ndarray-base-numel": "^0.0.8", - "@stdlib/ndarray-base-shape2strides": "^0.0.8", - "@stdlib/ndarray-base-strides2offset": "^0.0.8", - "@stdlib/ndarray-base-strides2order": "^0.0.6", - "@stdlib/ndarray-ctor": "^0.0.10", - "@stdlib/ndarray-defaults": "github:stdlib-js/ndarray-defaults#main", - "@stdlib/string-format": "^0.0.3", - "@stdlib/types": "^0.0.14" + "@stdlib/array-base-flatten": "^0.1.0", + "@stdlib/array-shape": "^0.1.0", + "@stdlib/assert-has-own-property": "^0.1.0", + "@stdlib/assert-is-array": "^0.1.0", + "@stdlib/assert-is-boolean": "^0.1.0", + "@stdlib/assert-is-ndarray-like": "^0.1.0", + "@stdlib/assert-is-nonnegative-integer": "^0.1.0", + "@stdlib/assert-is-plain-object": "^0.1.0", + "@stdlib/buffer-alloc-unsafe": "^0.1.0", + "@stdlib/constants-float64-pinf": "^0.1.0", + "@stdlib/math-base-assert-is-integer": "^0.1.0", + "@stdlib/math-base-special-abs": "^0.1.0", + "@stdlib/ndarray-base-assert-is-allowed-data-type-cast": "^0.1.0", + "@stdlib/ndarray-base-assert-is-casting-mode": "^0.1.0", + "@stdlib/ndarray-base-assert-is-data-type": "^0.1.0", + "@stdlib/ndarray-base-assert-is-order": "^0.1.0", + "@stdlib/ndarray-base-buffer": "^0.1.0", + "@stdlib/ndarray-base-buffer-ctors": "^0.1.0", + "@stdlib/ndarray-base-buffer-dtype": "^0.1.0", + "@stdlib/ndarray-base-numel": "^0.1.0", + "@stdlib/ndarray-base-shape2strides": "^0.1.0", + "@stdlib/ndarray-base-strides2offset": "^0.1.0", + "@stdlib/ndarray-base-strides2order": "^0.1.0", + "@stdlib/ndarray-ctor": "^0.1.0", + "@stdlib/ndarray-defaults": "^0.1.0", + "@stdlib/string-format": "^0.1.0", + "@stdlib/types": "^0.1.0" }, "devDependencies": { - "@stdlib/array-float32": "^0.0.6", - "@stdlib/bench": "^0.0.12", + "@stdlib/array-float32": "^0.1.0", + "@stdlib/bench": "^0.1.0", "tape": "git+https://github.com/kgryte/tape.git#fix/globby", "istanbul": "^0.4.1", "tap-min": "git+https://github.com/Planeshifter/tap-min.git"