@stdlib/ndarray-base-assert-is-same-kind-data-type-cast 0.1.0 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/NOTICE CHANGED
@@ -1 +1 @@
1
- Copyright (c) 2016-2023 The Stdlib Authors.
1
+ Copyright (c) 2016-2024 The Stdlib Authors.
package/README.md CHANGED
@@ -96,25 +96,17 @@ bool = isSameKindCast( 'uint16', 'int16' );
96
96
  <!-- eslint no-undef: "error" -->
97
97
 
98
98
  ```javascript
99
+ var cartesianSquare = require( '@stdlib/array-cartesian-square' );
99
100
  var dtypes = require( '@stdlib/ndarray-dtypes' );
100
101
  var isSameKindCast = require( '@stdlib/ndarray-base-assert-is-same-kind-data-type-cast' );
101
102
 
102
- var DTYPES;
103
- var bool;
104
- var dt;
103
+ // Generate a list of dtype pairs:
104
+ var dt = cartesianSquare( dtypes() );
105
+
106
+ // For each data type pair, determine whether one can cast from one data type to another...
105
107
  var i;
106
- var j;
107
-
108
- // Get a list of supported ndarray data types:
109
- DTYPES = dtypes();
110
-
111
- // For each data type, determine whether one can cast to another data type...
112
- for ( i = 0; i < DTYPES.length; i++ ) {
113
- dt = DTYPES[ i ];
114
- for ( j = 0; j < DTYPES.length; j++ ) {
115
- bool = isSameKindCast( dt, DTYPES[ j ] );
116
- console.log( '%s => %s. Allowed cast? %s.', dt, DTYPES[ j ], bool );
117
- }
108
+ for ( i = 0; i < dt.length; i++ ) {
109
+ console.log( '%s. Allowed cast? %s.', dt[i].join( ' => ' ), isSameKindCast.apply( null, dt[i] ) );
118
110
  }
119
111
  ```
120
112
 
@@ -164,7 +156,7 @@ See [LICENSE][stdlib-license].
164
156
 
165
157
  ## Copyright
166
158
 
167
- Copyright &copy; 2016-2023. The Stdlib [Authors][stdlib-authors].
159
+ Copyright &copy; 2016-2024. The Stdlib [Authors][stdlib-authors].
168
160
 
169
161
  </section>
170
162
 
@@ -177,8 +169,8 @@ Copyright &copy; 2016-2023. The Stdlib [Authors][stdlib-authors].
177
169
  [npm-image]: http://img.shields.io/npm/v/@stdlib/ndarray-base-assert-is-same-kind-data-type-cast.svg
178
170
  [npm-url]: https://npmjs.org/package/@stdlib/ndarray-base-assert-is-same-kind-data-type-cast
179
171
 
180
- [test-image]: https://github.com/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast/actions/workflows/test.yml/badge.svg?branch=v0.1.0
181
- [test-url]: https://github.com/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast/actions/workflows/test.yml?query=branch:v0.1.0
172
+ [test-image]: https://github.com/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast/actions/workflows/test.yml/badge.svg?branch=v0.2.0
173
+ [test-url]: https://github.com/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast/actions/workflows/test.yml?query=branch:v0.2.0
182
174
 
183
175
  [coverage-image]: https://img.shields.io/codecov/c/github/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast/main.svg
184
176
  [coverage-url]: https://codecov.io/github/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast?branch=main
@@ -201,8 +193,11 @@ Copyright &copy; 2016-2023. The Stdlib [Authors][stdlib-authors].
201
193
  [es-module]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Modules
202
194
 
203
195
  [deno-url]: https://github.com/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast/tree/deno
196
+ [deno-readme]: https://github.com/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast/blob/deno/README.md
204
197
  [umd-url]: https://github.com/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast/tree/umd
198
+ [umd-readme]: https://github.com/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast/blob/umd/README.md
205
199
  [esm-url]: https://github.com/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast/tree/esm
200
+ [esm-readme]: https://github.com/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast/blob/esm/README.md
206
201
  [branches-url]: https://github.com/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast/blob/main/branches.md
207
202
 
208
203
  [stdlib-license]: https://raw.githubusercontent.com/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast/main/LICENSE
package/SECURITY.md ADDED
@@ -0,0 +1,5 @@
1
+ # Security
2
+
3
+ > Policy for reporting security vulnerabilities.
4
+
5
+ See the security policy [in the main project repository](https://github.com/stdlib-js/stdlib/security).
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stdlib/ndarray-base-assert-is-same-kind-data-type-cast",
3
- "version": "0.1.0",
3
+ "version": "0.2.0",
4
4
  "description": "Determine if an ndarray data type can be safely cast to, or is of the same kind as, another ndarray data type.",
5
5
  "license": "Apache-2.0",
6
6
  "author": {
@@ -39,16 +39,18 @@
39
39
  "url": "https://github.com/stdlib-js/stdlib/issues"
40
40
  },
41
41
  "dependencies": {
42
- "@stdlib/ndarray-dtypes": "^0.1.0",
43
- "@stdlib/ndarray-same-kind-casts": "^0.1.0",
44
- "@stdlib/utils-library-manifest": "^0.1.0"
42
+ "@stdlib/ndarray-dtypes": "^0.2.0",
43
+ "@stdlib/ndarray-same-kind-casts": "^0.2.0",
44
+ "@stdlib/utils-library-manifest": "^0.2.0"
45
45
  },
46
46
  "devDependencies": {
47
- "@stdlib/assert-is-boolean": "^0.1.0",
48
- "@stdlib/bench": "^0.1.0",
47
+ "@stdlib/array-cartesian-square": "^0.1.0",
48
+ "@stdlib/assert-is-boolean": "^0.1.1",
49
49
  "tape": "git+https://github.com/kgryte/tape.git#fix/globby",
50
50
  "istanbul": "^0.4.1",
51
- "tap-min": "git+https://github.com/Planeshifter/tap-min.git"
51
+ "tap-min": "git+https://github.com/Planeshifter/tap-min.git",
52
+ "@stdlib/bench-harness": "^0.2.0",
53
+ "@stdlib/bench": "^0.3.1"
52
54
  },
53
55
  "engines": {
54
56
  "node": ">=0.10.0",
package/CITATION.cff DELETED
@@ -1,30 +0,0 @@
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