Skip to content

Commit

Permalink
Release v0.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
stdlib-bot committed Sep 24, 2023
1 parent 752eb0f commit e8a3107
Show file tree
Hide file tree
Showing 6 changed files with 97 additions and 39 deletions.
5 changes: 5 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -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
30 changes: 30 additions & 0 deletions CITATION.cff
Original file line number Diff line number Diff line change
@@ -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
15 changes: 13 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,17 @@ limitations under the License.
-->


<details>
<summary>
About stdlib...
</summary>
<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>
<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>
<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>
<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>
</details>

# Multidimensional Arrays

[![NPM version][npm-image]][npm-url] [![Build Status][test-image]][test-url] [![Coverage Status][coverage-image]][coverage-url] <!-- [![dependencies][dependencies-image]][dependencies-url] -->
Expand Down Expand Up @@ -318,8 +329,8 @@ Copyright &copy; 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
Expand Down
6 changes: 3 additions & 3 deletions docs/types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
/// <reference types="@stdlib/types"/>

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.
Expand Down Expand Up @@ -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<T = unknown>( options: OptionsWithShape | OptionsWithBuffer ): typedndarray<T>; // tslint:disable-line:no-unnecessary-generics

/**
* Returns a multidimensional array.
Expand Down Expand Up @@ -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<any>, options?: ExtendedOptions ): ndarray; // tslint:disable-line:max-line-length
declare function array<T = unknown>( buffer: ArrayLike<any>, options?: ExtendedOptions ): typedndarray<T>; // tslint:disable-line:no-unnecessary-generics


// EXPORTS //
Expand Down
20 changes: 16 additions & 4 deletions docs/types/test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<number>( [ [ 1, 2 ], [ 3, 4 ] ] ); // $ExpectType typedndarray<number>
array<number>( new Float64Array( [ 1.0, 2.0, 3.0, 4.0 ] ), { 'shape': [ 2, 2 ] } ); // $ExpectType typedndarray<number>
array<number>( { 'shape': [ 2, 2 ] } ); // $ExpectType typedndarray<number>
array<number>( { 'buffer': [ [ 1, 2 ], [ 3, 4 ] ] } ); // $ExpectType typedndarray<number>
}

// The compiler throws an error if the function is provided a first argument which is not an array, buffer, or options object...
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
}
60 changes: 30 additions & 30 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@stdlib/ndarray-array",
"version": "0.0.9",
"version": "0.1.0",
"description": "Multidimensional arrays.",
"license": "Apache-2.0",
"author": {
Expand Down Expand Up @@ -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"
Expand Down

0 comments on commit e8a3107

Please sign in to comment.