@stdlib/ndarray-same-kind-casts 0.2.1 → 0.4.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 +1 -1
- package/README.md +5 -5
- package/dist/index.js +3 -3
- package/dist/index.js.map +2 -2
- package/include/stdlib/ndarray/same_kind_casts.h +86 -0
- package/lib/same_kind_casts.json +360 -195
- package/manifest.json +36 -36
- package/package.json +5 -6
package/NOTICE
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Copyright (c) 2016-
|
|
1
|
+
Copyright (c) 2016-2026 The Stdlib Authors.
|
package/README.md
CHANGED
|
@@ -184,7 +184,7 @@ See [LICENSE][stdlib-license].
|
|
|
184
184
|
|
|
185
185
|
## Copyright
|
|
186
186
|
|
|
187
|
-
Copyright © 2016-
|
|
187
|
+
Copyright © 2016-2026. The Stdlib [Authors][stdlib-authors].
|
|
188
188
|
|
|
189
189
|
</section>
|
|
190
190
|
|
|
@@ -197,8 +197,8 @@ Copyright © 2016-2024. The Stdlib [Authors][stdlib-authors].
|
|
|
197
197
|
[npm-image]: http://img.shields.io/npm/v/@stdlib/ndarray-same-kind-casts.svg
|
|
198
198
|
[npm-url]: https://npmjs.org/package/@stdlib/ndarray-same-kind-casts
|
|
199
199
|
|
|
200
|
-
[test-image]: https://github.com/stdlib-js/ndarray-same-kind-casts/actions/workflows/test.yml/badge.svg?branch=v0.
|
|
201
|
-
[test-url]: https://github.com/stdlib-js/ndarray-same-kind-casts/actions/workflows/test.yml?query=branch:v0.
|
|
200
|
+
[test-image]: https://github.com/stdlib-js/ndarray-same-kind-casts/actions/workflows/test.yml/badge.svg?branch=v0.4.0
|
|
201
|
+
[test-url]: https://github.com/stdlib-js/ndarray-same-kind-casts/actions/workflows/test.yml?query=branch:v0.4.0
|
|
202
202
|
|
|
203
203
|
[coverage-image]: https://img.shields.io/codecov/c/github/stdlib-js/ndarray-same-kind-casts/main.svg
|
|
204
204
|
[coverage-url]: https://codecov.io/github/stdlib-js/ndarray-same-kind-casts?branch=main
|
|
@@ -210,8 +210,8 @@ Copyright © 2016-2024. The Stdlib [Authors][stdlib-authors].
|
|
|
210
210
|
|
|
211
211
|
-->
|
|
212
212
|
|
|
213
|
-
[chat-image]: https://img.shields.io/
|
|
214
|
-
[chat-url]: https://
|
|
213
|
+
[chat-image]: https://img.shields.io/badge/zulip-join_chat-brightgreen.svg
|
|
214
|
+
[chat-url]: https://stdlib.zulipchat.com
|
|
215
215
|
|
|
216
216
|
[stdlib]: https://github.com/stdlib-js/stdlib
|
|
217
217
|
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
"use strict";var p=function(t,n){return function(){return n||t((n={exports:{}}).exports,n),n.exports}};var m=p(function(A,
|
|
2
|
-
var x=require('@stdlib/utils-keys/dist'),
|
|
3
|
-
});var T=
|
|
1
|
+
"use strict";var p=function(t,n){return function(){return n||t((n={exports:{}}).exports,n),n.exports}};var m=p(function(A,g){g.exports={float64:{float64:1,float32:1,float16:1,int64:0,int32:0,int16:0,int8:0,uint64:0,uint32:0,uint16:0,uint8:0,uint8c:0,complex128:1,complex64:0,complex32:0,binary:0,generic:1,bool:0},float32:{float64:1,float32:1,float16:1,int64:0,int32:0,int16:0,int8:0,uint64:0,uint32:0,uint16:0,uint8:0,uint8c:0,complex128:1,complex64:1,complex32:0,binary:0,generic:1,bool:0},float16:{float64:1,float32:1,float16:1,int64:0,int32:0,int16:0,int8:0,uint64:0,uint32:0,uint16:0,uint8:0,uint8c:0,complex128:1,complex64:1,complex32:1,binary:0,generic:1,bool:0},int64:{float64:0,float32:0,float16:0,int64:1,int32:1,int16:1,int8:1,uint64:0,uint32:0,uint16:0,uint8:0,uint8c:0,complex128:0,complex64:0,complex32:0,binary:0,generic:1,bool:0},int32:{float64:1,float32:0,float16:0,int64:1,int32:1,int16:1,int8:1,uint64:0,uint32:0,uint16:0,uint8:0,uint8c:0,complex128:1,complex64:0,complex32:0,binary:0,generic:1,bool:0},int16:{float64:1,float32:1,float16:0,int64:1,int32:1,int16:1,int8:1,uint64:0,uint32:0,uint16:0,uint8:0,uint8c:0,complex128:1,complex64:1,complex32:0,binary:0,generic:1,bool:0},int8:{float64:1,float32:1,float16:1,int64:1,int32:1,int16:1,int8:1,uint64:0,uint32:0,uint16:0,uint8:0,uint8c:0,complex128:1,complex64:1,complex32:0,binary:0,generic:1,bool:0},uint64:{float64:0,float32:0,float16:0,int64:0,int32:0,int16:0,int8:0,uint64:1,uint32:1,uint16:1,uint8:1,uint8c:1,complex128:1,complex64:0,complex32:0,binary:0,generic:1,bool:0},uint32:{float64:1,float32:0,float16:0,int64:1,int32:0,int16:0,int8:0,uint64:1,uint32:1,uint16:1,uint8:1,uint8c:1,complex128:1,complex64:0,complex32:0,binary:0,generic:1,bool:0},uint16:{float64:1,float32:1,float16:0,int64:1,int32:1,int16:0,int8:0,uint64:1,uint32:1,uint16:1,uint8:1,uint8c:1,complex128:1,complex64:1,complex32:0,binary:0,generic:1,bool:0},uint8:{float64:1,float32:1,float16:1,int64:1,int32:1,int16:1,int8:0,uint64:1,uint32:1,uint16:1,uint8:1,uint8c:1,complex128:1,complex64:1,complex32:1,binary:0,generic:1,bool:0},uint8c:{float64:1,float32:1,float16:1,int64:1,int32:1,int16:1,int8:0,uint64:1,uint32:1,uint16:1,uint8:1,uint8c:1,complex128:1,complex64:1,complex32:1,binary:0,generic:1,bool:0},complex128:{float64:0,float32:0,float16:0,int64:0,int32:0,int16:0,int8:0,uint64:0,uint32:0,uint16:0,uint8:0,uint8c:0,complex128:1,complex64:1,complex32:1,binary:0,generic:0,bool:0},complex64:{float64:0,float32:0,float16:0,int64:0,int32:0,int16:0,int8:0,uint64:0,uint32:0,uint16:0,uint8:0,uint8c:0,complex128:1,complex64:1,complex32:1,binary:0,generic:0,bool:0},complex32:{float64:0,float32:0,float16:0,int64:0,int32:0,int16:0,int8:0,uint64:0,uint32:0,uint16:0,uint8:0,uint8c:0,complex128:1,complex64:1,complex32:1,binary:0,generic:0,bool:0},generic:{float64:0,float32:0,float16:0,int64:0,int32:0,int16:0,int8:0,uint64:0,uint32:0,uint16:0,uint8:0,uint8c:0,complex128:0,complex64:0,complex32:0,binary:0,generic:1,bool:0},binary:{float64:0,float32:0,float16:0,int64:0,int32:0,int16:0,int8:0,uint64:0,uint32:0,uint16:0,uint8:0,uint8c:0,complex128:0,complex64:0,complex32:0,binary:1,generic:0,bool:0},bool:{float64:0,float32:0,float16:0,int64:0,int32:0,int16:0,int8:0,uint64:0,uint32:0,uint16:0,uint8:0,uint8c:0,complex128:0,complex64:0,complex32:0,binary:0,generic:1,bool:1}}});var v=p(function(K,b){
|
|
2
|
+
var x=require('@stdlib/utils-keys/dist'),y=require('@stdlib/assert-has-own-property/dist'),s=require('@stdlib/ndarray-base-dtype-resolve-str/dist'),f=m(),r;function d(){var t,n,l,e,u,a,c,i,o;for(l={},t=x(f),n=t.length,o=0;o<n;o++){for(u=t[o],c=f[u],e={},i=0;i<n;i++)a=t[i],e[a]=c[a];l[u]=e}return l}function h(){var t,n,l,e,u,a,c,i,o;for(l={},t=x(f),n=t.length,o=0;o<n;o++){for(u=t[o],c=f[u],e=[],i=0;i<n;i++)a=t[i],c[a]===1&&e.push(a);l[u]=e}return l}function q(t){return arguments.length===0?d():(r===void 0&&(r=h()),t=s(t),y(r,t)?r[t].slice():null)}b.exports=q
|
|
3
|
+
});var T=v();module.exports=T;
|
|
4
4
|
/** @license Apache-2.0 */
|
|
5
5
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../lib/same_kind_casts.json", "../lib/main.js", "../lib/index.js"],
|
|
4
|
-
"sourcesContent": ["{\n\t\"float64\": {\n\t\t\"float64\": 1,\n\t\t\"float32\": 1,\n\t\t\"int32\": 0,\n\t\t\"int16\": 0,\n\t\t\"int8\": 0,\n\t\t\"uint32\": 0,\n\t\t\"uint16\": 0,\n\t\t\"uint8\": 0,\n\t\t\"uint8c\": 0,\n\t\t\"complex128\": 1,\n\t\t\"complex64\": 0,\n\t\t\"binary\": 0,\n\t\t\"generic\": 1\n\t},\n\t\"float32\": {\n\t\t\"float64\": 1,\n\t\t\"float32\": 1,\n\t\t\"int32\": 0,\n\t\t\"int16\": 0,\n\t\t\"int8\": 0,\n\t\t\"uint32\": 0,\n\t\t\"uint16\": 0,\n\t\t\"uint8\": 0,\n\t\t\"uint8c\": 0,\n\t\t\"complex128\": 1,\n\t\t\"complex64\": 1,\n\t\t\"binary\": 0,\n\t\t\"generic\": 1\n\t},\n\t\"int32\": {\n\t\t\"float64\": 1,\n\t\t\"float32\": 0,\n\t\t\"int32\": 1,\n\t\t\"int16\": 1,\n\t\t\"int8\": 1,\n\t\t\"uint32\": 0,\n\t\t\"uint16\": 0,\n\t\t\"uint8\": 0,\n\t\t\"uint8c\": 0,\n\t\t\"complex128\": 1,\n\t\t\"complex64\": 0,\n\t\t\"binary\": 0,\n\t\t\"generic\": 1\n\t},\n\t\"int16\": {\n\t\t\"float64\": 1,\n\t\t\"float32\": 1,\n\t\t\"int32\": 1,\n\t\t\"int16\": 1,\n\t\t\"int8\": 1,\n\t\t\"uint32\": 0,\n\t\t\"uint16\": 0,\n\t\t\"uint8\": 0,\n\t\t\"uint8c\": 0,\n\t\t\"complex128\": 1,\n\t\t\"complex64\": 1,\n\t\t\"binary\": 0,\n\t\t\"generic\": 1\n\t},\n\t\"int8\": {\n\t\t\"float64\": 1,\n\t\t\"float32\": 1,\n\t\t\"int32\": 1,\n\t\t\"int16\": 1,\n\t\t\"int8\": 1,\n\t\t\"uint32\": 0,\n\t\t\"uint16\": 0,\n\t\t\"uint8\": 0,\n\t\t\"uint8c\": 0,\n\t\t\"complex128\": 1,\n\t\t\"complex64\": 1,\n\t\t\"binary\": 0,\n\t\t\"generic\": 1\n\t},\n\t\"uint32\": {\n\t\t\"float64\": 1,\n\t\t\"float32\": 0,\n\t\t\"int32\": 0,\n\t\t\"int16\": 0,\n\t\t\"int8\": 0,\n\t\t\"uint32\": 1,\n\t\t\"uint16\": 1,\n\t\t\"uint8\": 1,\n\t\t\"uint8c\": 1,\n\t\t\"complex128\": 1,\n\t\t\"complex64\": 0,\n\t\t\"binary\": 0,\n\t\t\"generic\": 1\n\t},\n\t\"uint16\": {\n\t\t\"float64\": 1,\n\t\t\"float32\": 1,\n\t\t\"int32\": 1,\n\t\t\"int16\": 0,\n\t\t\"int8\": 0,\n\t\t\"uint32\": 1,\n\t\t\"uint16\": 1,\n\t\t\"uint8\": 1,\n\t\t\"uint8c\": 1,\n\t\t\"complex128\": 1,\n\t\t\"complex64\": 1,\n\t\t\"binary\": 0,\n\t\t\"generic\": 1\n\t},\n\t\"uint8\": {\n\t\t\"float64\": 1,\n\t\t\"float32\": 1,\n\t\t\"int32\": 1,\n\t\t\"int16\": 1,\n\t\t\"int8\": 0,\n\t\t\"uint32\": 1,\n\t\t\"uint16\": 1,\n\t\t\"uint8\": 1,\n\t\t\"uint8c\": 1,\n\t\t\"complex128\": 1,\n\t\t\"complex64\": 1,\n\t\t\"binary\": 0,\n\t\t\"generic\": 1\n\t},\n\t\"uint8c\": {\n\t\t\"float64\": 1,\n\t\t\"float32\": 1,\n\t\t\"int32\": 1,\n\t\t\"int16\": 1,\n\t\t\"int8\": 0,\n\t\t\"uint32\": 1,\n\t\t\"uint16\": 1,\n\t\t\"uint8\": 1,\n\t\t\"uint8c\": 1,\n\t\t\"complex128\": 1,\n\t\t\"complex64\": 1,\n\t\t\"binary\": 0,\n\t\t\"generic\": 1\n\t},\n\t\"complex128\": {\n\t\t\"float64\": 0,\n\t\t\"float32\": 0,\n\t\t\"int32\": 0,\n\t\t\"int16\": 0,\n\t\t\"int8\": 0,\n\t\t\"uint32\": 0,\n\t\t\"uint16\": 0,\n\t\t\"uint8\": 0,\n\t\t\"uint8c\": 0,\n\t\t\"complex128\": 1,\n\t\t\"complex64\": 1,\n\t\t\"binary\": 0,\n\t\t\"generic\": 0\n\t},\n\t\"complex64\": {\n\t\t\"float64\": 0,\n\t\t\"float32\": 0,\n\t\t\"int32\": 0,\n\t\t\"int16\": 0,\n\t\t\"int8\": 0,\n\t\t\"uint32\": 0,\n\t\t\"uint16\": 0,\n\t\t\"uint8\": 0,\n\t\t\"uint8c\": 0,\n\t\t\"complex128\": 1,\n\t\t\"complex64\": 1,\n\t\t\"binary\": 0,\n\t\t\"generic\": 0\n\t},\n\t\"generic\": {\n\t\t\"float64\": 0,\n\t\t\"float32\": 0,\n\t\t\"int32\": 0,\n\t\t\"int16\": 0,\n\t\t\"int8\": 0,\n\t\t\"uint32\": 0,\n\t\t\"uint16\": 0,\n\t\t\"uint8\": 0,\n\t\t\"uint8c\": 0,\n\t\t\"complex128\": 0,\n\t\t\"complex64\": 0,\n\t\t\"binary\": 0,\n\t\t\"generic\": 1\n\t},\n\t\"binary\": {\n\t\t\"float64\": 0,\n\t\t\"float32\": 0,\n\t\t\"int32\": 0,\n\t\t\"int16\": 0,\n\t\t\"int8\": 0,\n\t\t\"uint32\": 0,\n\t\t\"uint16\": 0,\n\t\t\"uint8\": 0,\n\t\t\"uint8c\": 0,\n\t\t\"complex128\": 0,\n\t\t\"complex64\": 0,\n\t\t\"binary\": 1,\n\t\t\"generic\": 0\n\t}\n}\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar objectKeys = require( '@stdlib/utils-keys' );\nvar hasOwnProp = require( '@stdlib/assert-has-own-property' );\nvar resolve = require( '@stdlib/ndarray-base-dtype-resolve-str' );\nvar SAME_KIND_CASTS = require( './same_kind_casts.json' );\n\n\n// VARIABLES //\n\nvar TABLE;\n\n\n// FUNCTIONS //\n\n/**\n* Generates a full table of same \"kind\" casts for each ndarray data type.\n*\n* @private\n* @returns {Object} table\n*/\nfunction generateFullTable() {\n\tvar dtypes;\n\tvar ntypes;\n\tvar out;\n\tvar tmp;\n\tvar dt1;\n\tvar dt2;\n\tvar o;\n\tvar j;\n\tvar i;\n\n\tout = {};\n\tdtypes = objectKeys( SAME_KIND_CASTS );\n\tntypes = dtypes.length;\n\tfor ( i = 0; i < ntypes; i++ ) {\n\t\tdt1 = dtypes[ i ];\n\t\to = SAME_KIND_CASTS[ dt1 ];\n\t\ttmp = {};\n\t\tfor ( j = 0; j < ntypes; j++ ) {\n\t\t\tdt2 = dtypes[ j ];\n\t\t\ttmp[ dt2 ] = o[ dt2 ];\n\t\t}\n\t\tout[ dt1 ] = tmp;\n\t}\n\treturn out;\n}\n\n/**\n* Generates a table of same \"kind\" casts for each ndarray data type.\n*\n* @private\n* @returns {Object} table\n*/\nfunction generateTable() {\n\tvar dtypes;\n\tvar ntypes;\n\tvar out;\n\tvar tmp;\n\tvar dt1;\n\tvar dt2;\n\tvar o;\n\tvar j;\n\tvar i;\n\n\tout = {};\n\tdtypes = objectKeys( SAME_KIND_CASTS );\n\tntypes = dtypes.length;\n\tfor ( i = 0; i < ntypes; i++ ) {\n\t\tdt1 = dtypes[ i ];\n\t\to = SAME_KIND_CASTS[ dt1 ];\n\t\ttmp = [];\n\t\tfor ( j = 0; j < ntypes; j++ ) {\n\t\t\tdt2 = dtypes[ j ];\n\t\t\tif ( o[ dt2 ] === 1 ) {\n\t\t\t\ttmp.push( dt2 );\n\t\t\t}\n\t\t}\n\t\tout[ dt1 ] = tmp;\n\t}\n\treturn out;\n}\n\n\n// MAIN //\n\n/**\n* Returns a list of ndarray data types to which a provided ndarray data type can be safely cast or cast within the same \"kind\".\n*\n* @param {*} [dtype] - ndarray data type value\n* @returns {(Object|StringArray|null)} list of ndarray data types or null\n*\n* @example\n* var list = sameKindCasts( 'float32' );\n* // returns [...]\n*/\nfunction sameKindCasts( dtype ) {\n\tif ( arguments.length === 0 ) {\n\t\treturn generateFullTable();\n\t}\n\tif ( TABLE === void 0 ) {\n\t\t// Lazily generate table...\n\t\tTABLE = generateTable();\n\t}\n\tdtype = resolve( dtype );\n\tif ( hasOwnProp( TABLE, dtype ) ) {\n\t\treturn TABLE[ dtype ].slice();\n\t}\n\treturn null;\n}\n\n\n// EXPORTS //\n\nmodule.exports = sameKindCasts;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Return a list of ndarray data types to which a provided ndarray data type can be safely cast or cast within the same \"kind\".\n*\n* @module @stdlib/ndarray-same-kind-casts\n*\n* @example\n* var sameKindCasts = require( '@stdlib/ndarray-same-kind-casts' );\n*\n* var list = sameKindCasts( 'float32' );\n* // returns [...]\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n"],
|
|
5
|
-
"mappings": "uGAAA,IAAAA,EAAAC,EAAA,SAAAC,EAAAC,EAAA,CAAAA,EAAA,
|
|
4
|
+
"sourcesContent": ["{\n \"float64\": {\n \"float64\": 1,\n \"float32\": 1,\n \"float16\": 1,\n \"int64\": 0,\n \"int32\": 0,\n \"int16\": 0,\n \"int8\": 0,\n \"uint64\": 0,\n \"uint32\": 0,\n \"uint16\": 0,\n \"uint8\": 0,\n \"uint8c\": 0,\n \"complex128\": 1,\n \"complex64\": 0,\n \"complex32\": 0,\n \"binary\": 0,\n \"generic\": 1,\n \"bool\": 0\n },\n \"float32\": {\n \"float64\": 1,\n \"float32\": 1,\n \"float16\": 1,\n \"int64\": 0,\n \"int32\": 0,\n \"int16\": 0,\n \"int8\": 0,\n \"uint64\": 0,\n \"uint32\": 0,\n \"uint16\": 0,\n \"uint8\": 0,\n \"uint8c\": 0,\n \"complex128\": 1,\n \"complex64\": 1,\n \"complex32\": 0,\n \"binary\": 0,\n \"generic\": 1,\n \"bool\": 0\n },\n \"float16\": {\n \"float64\": 1,\n \"float32\": 1,\n \"float16\": 1,\n \"int64\": 0,\n \"int32\": 0,\n \"int16\": 0,\n \"int8\": 0,\n \"uint64\": 0,\n \"uint32\": 0,\n \"uint16\": 0,\n \"uint8\": 0,\n \"uint8c\": 0,\n \"complex128\": 1,\n \"complex64\": 1,\n \"complex32\": 1,\n \"binary\": 0,\n \"generic\": 1,\n \"bool\": 0\n },\n \"int64\": {\n \"float64\": 0,\n \"float32\": 0,\n \"float16\": 0,\n \"int64\": 1,\n \"int32\": 1,\n \"int16\": 1,\n \"int8\": 1,\n \"uint64\": 0,\n \"uint32\": 0,\n \"uint16\": 0,\n \"uint8\": 0,\n \"uint8c\": 0,\n \"complex128\": 0,\n \"complex64\": 0,\n \"complex32\": 0,\n \"binary\": 0,\n \"generic\": 1,\n \"bool\": 0\n },\n \"int32\": {\n \"float64\": 1,\n \"float32\": 0,\n \"float16\": 0,\n \"int64\": 1,\n \"int32\": 1,\n \"int16\": 1,\n \"int8\": 1,\n \"uint64\": 0,\n \"uint32\": 0,\n \"uint16\": 0,\n \"uint8\": 0,\n \"uint8c\": 0,\n \"complex128\": 1,\n \"complex64\": 0,\n \"complex32\": 0,\n \"binary\": 0,\n \"generic\": 1,\n \"bool\": 0\n },\n \"int16\": {\n \"float64\": 1,\n \"float32\": 1,\n \"float16\": 0,\n \"int64\": 1,\n \"int32\": 1,\n \"int16\": 1,\n \"int8\": 1,\n \"uint64\": 0,\n \"uint32\": 0,\n \"uint16\": 0,\n \"uint8\": 0,\n \"uint8c\": 0,\n \"complex128\": 1,\n \"complex64\": 1,\n \"complex32\": 0,\n \"binary\": 0,\n \"generic\": 1,\n \"bool\": 0\n },\n \"int8\": {\n \"float64\": 1,\n \"float32\": 1,\n \"float16\": 1,\n \"int64\": 1,\n \"int32\": 1,\n \"int16\": 1,\n \"int8\": 1,\n \"uint64\": 0,\n \"uint32\": 0,\n \"uint16\": 0,\n \"uint8\": 0,\n \"uint8c\": 0,\n \"complex128\": 1,\n \"complex64\": 1,\n \"complex32\": 0,\n \"binary\": 0,\n \"generic\": 1,\n \"bool\": 0\n },\n \"uint64\": {\n \"float64\": 0,\n \"float32\": 0,\n \"float16\": 0,\n \"int64\": 0,\n \"int32\": 0,\n \"int16\": 0,\n \"int8\": 0,\n \"uint64\": 1,\n \"uint32\": 1,\n \"uint16\": 1,\n \"uint8\": 1,\n \"uint8c\": 1,\n \"complex128\": 1,\n \"complex64\": 0,\n \"complex32\": 0,\n \"binary\": 0,\n \"generic\": 1,\n \"bool\": 0\n },\n \"uint32\": {\n \"float64\": 1,\n \"float32\": 0,\n \"float16\": 0,\n \"int64\": 1,\n \"int32\": 0,\n \"int16\": 0,\n \"int8\": 0,\n \"uint64\": 1,\n \"uint32\": 1,\n \"uint16\": 1,\n \"uint8\": 1,\n \"uint8c\": 1,\n \"complex128\": 1,\n \"complex64\": 0,\n \"complex32\": 0,\n \"binary\": 0,\n \"generic\": 1,\n \"bool\": 0\n },\n \"uint16\": {\n \"float64\": 1,\n \"float32\": 1,\n \"float16\": 0,\n \"int64\": 1,\n \"int32\": 1,\n \"int16\": 0,\n \"int8\": 0,\n \"uint64\": 1,\n \"uint32\": 1,\n \"uint16\": 1,\n \"uint8\": 1,\n \"uint8c\": 1,\n \"complex128\": 1,\n \"complex64\": 1,\n \"complex32\": 0,\n \"binary\": 0,\n \"generic\": 1,\n \"bool\": 0\n },\n \"uint8\": {\n \"float64\": 1,\n \"float32\": 1,\n \"float16\": 1,\n \"int64\": 1,\n \"int32\": 1,\n \"int16\": 1,\n \"int8\": 0,\n \"uint64\": 1,\n \"uint32\": 1,\n \"uint16\": 1,\n \"uint8\": 1,\n \"uint8c\": 1,\n \"complex128\": 1,\n \"complex64\": 1,\n \"complex32\": 1,\n \"binary\": 0,\n \"generic\": 1,\n \"bool\": 0\n },\n \"uint8c\": {\n \"float64\": 1,\n \"float32\": 1,\n \"float16\": 1,\n \"int64\": 1,\n \"int32\": 1,\n \"int16\": 1,\n \"int8\": 0,\n \"uint64\": 1,\n \"uint32\": 1,\n \"uint16\": 1,\n \"uint8\": 1,\n \"uint8c\": 1,\n \"complex128\": 1,\n \"complex64\": 1,\n \"complex32\": 1,\n \"binary\": 0,\n \"generic\": 1,\n \"bool\": 0\n },\n \"complex128\": {\n \"float64\": 0,\n \"float32\": 0,\n \"float16\": 0,\n \"int64\": 0,\n \"int32\": 0,\n \"int16\": 0,\n \"int8\": 0,\n \"uint64\": 0,\n \"uint32\": 0,\n \"uint16\": 0,\n \"uint8\": 0,\n \"uint8c\": 0,\n \"complex128\": 1,\n \"complex64\": 1,\n \"complex32\": 1,\n \"binary\": 0,\n \"generic\": 0,\n \"bool\": 0\n },\n \"complex64\": {\n \"float64\": 0,\n \"float32\": 0,\n \"float16\": 0,\n \"int64\": 0,\n \"int32\": 0,\n \"int16\": 0,\n \"int8\": 0,\n \"uint64\": 0,\n \"uint32\": 0,\n \"uint16\": 0,\n \"uint8\": 0,\n \"uint8c\": 0,\n \"complex128\": 1,\n \"complex64\": 1,\n \"complex32\": 1,\n \"binary\": 0,\n \"generic\": 0,\n \"bool\": 0\n },\n \"complex32\": {\n \"float64\": 0,\n \"float32\": 0,\n \"float16\": 0,\n \"int64\": 0,\n \"int32\": 0,\n \"int16\": 0,\n \"int8\": 0,\n \"uint64\": 0,\n \"uint32\": 0,\n \"uint16\": 0,\n \"uint8\": 0,\n \"uint8c\": 0,\n \"complex128\": 1,\n \"complex64\": 1,\n \"complex32\": 1,\n \"binary\": 0,\n \"generic\": 0,\n \"bool\": 0\n },\n \"generic\": {\n \"float64\": 0,\n \"float32\": 0,\n \"float16\": 0,\n \"int64\": 0,\n \"int32\": 0,\n \"int16\": 0,\n \"int8\": 0,\n \"uint64\": 0,\n \"uint32\": 0,\n \"uint16\": 0,\n \"uint8\": 0,\n \"uint8c\": 0,\n \"complex128\": 0,\n \"complex64\": 0,\n \"complex32\": 0,\n \"binary\": 0,\n \"generic\": 1,\n \"bool\": 0\n },\n \"binary\": {\n \"float64\": 0,\n \"float32\": 0,\n \"float16\": 0,\n \"int64\": 0,\n \"int32\": 0,\n \"int16\": 0,\n \"int8\": 0,\n \"uint64\": 0,\n \"uint32\": 0,\n \"uint16\": 0,\n \"uint8\": 0,\n \"uint8c\": 0,\n \"complex128\": 0,\n \"complex64\": 0,\n \"complex32\": 0,\n \"binary\": 1,\n \"generic\": 0,\n \"bool\": 0\n },\n \"bool\": {\n \"float64\": 0,\n \"float32\": 0,\n \"float16\": 0,\n \"int64\": 0,\n \"int32\": 0,\n \"int16\": 0,\n \"int8\": 0,\n \"uint64\": 0,\n \"uint32\": 0,\n \"uint16\": 0,\n \"uint8\": 0,\n \"uint8c\": 0,\n \"complex128\": 0,\n \"complex64\": 0,\n \"complex32\": 0,\n \"binary\": 0,\n \"generic\": 1,\n \"bool\": 1\n }\n}\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar objectKeys = require( '@stdlib/utils-keys' );\nvar hasOwnProp = require( '@stdlib/assert-has-own-property' );\nvar resolve = require( '@stdlib/ndarray-base-dtype-resolve-str' );\nvar SAME_KIND_CASTS = require( './same_kind_casts.json' );\n\n\n// VARIABLES //\n\nvar TABLE;\n\n\n// FUNCTIONS //\n\n/**\n* Generates a full table of same \"kind\" casts for each ndarray data type.\n*\n* @private\n* @returns {Object} table\n*/\nfunction generateFullTable() {\n\tvar dtypes;\n\tvar ntypes;\n\tvar out;\n\tvar tmp;\n\tvar dt1;\n\tvar dt2;\n\tvar o;\n\tvar j;\n\tvar i;\n\n\tout = {};\n\tdtypes = objectKeys( SAME_KIND_CASTS );\n\tntypes = dtypes.length;\n\tfor ( i = 0; i < ntypes; i++ ) {\n\t\tdt1 = dtypes[ i ];\n\t\to = SAME_KIND_CASTS[ dt1 ];\n\t\ttmp = {};\n\t\tfor ( j = 0; j < ntypes; j++ ) {\n\t\t\tdt2 = dtypes[ j ];\n\t\t\ttmp[ dt2 ] = o[ dt2 ];\n\t\t}\n\t\tout[ dt1 ] = tmp;\n\t}\n\treturn out;\n}\n\n/**\n* Generates a table of same \"kind\" casts for each ndarray data type.\n*\n* @private\n* @returns {Object} table\n*/\nfunction generateTable() {\n\tvar dtypes;\n\tvar ntypes;\n\tvar out;\n\tvar tmp;\n\tvar dt1;\n\tvar dt2;\n\tvar o;\n\tvar j;\n\tvar i;\n\n\tout = {};\n\tdtypes = objectKeys( SAME_KIND_CASTS );\n\tntypes = dtypes.length;\n\tfor ( i = 0; i < ntypes; i++ ) {\n\t\tdt1 = dtypes[ i ];\n\t\to = SAME_KIND_CASTS[ dt1 ];\n\t\ttmp = [];\n\t\tfor ( j = 0; j < ntypes; j++ ) {\n\t\t\tdt2 = dtypes[ j ];\n\t\t\tif ( o[ dt2 ] === 1 ) {\n\t\t\t\ttmp.push( dt2 );\n\t\t\t}\n\t\t}\n\t\tout[ dt1 ] = tmp;\n\t}\n\treturn out;\n}\n\n\n// MAIN //\n\n/**\n* Returns a list of ndarray data types to which a provided ndarray data type can be safely cast or cast within the same \"kind\".\n*\n* @param {*} [dtype] - ndarray data type value\n* @returns {(Object|StringArray|null)} list of ndarray data types or null\n*\n* @example\n* var list = sameKindCasts( 'float32' );\n* // returns [...]\n*/\nfunction sameKindCasts( dtype ) {\n\tif ( arguments.length === 0 ) {\n\t\treturn generateFullTable();\n\t}\n\tif ( TABLE === void 0 ) {\n\t\t// Lazily generate table...\n\t\tTABLE = generateTable();\n\t}\n\tdtype = resolve( dtype );\n\tif ( hasOwnProp( TABLE, dtype ) ) {\n\t\treturn TABLE[ dtype ].slice();\n\t}\n\treturn null;\n}\n\n\n// EXPORTS //\n\nmodule.exports = sameKindCasts;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Return a list of ndarray data types to which a provided ndarray data type can be safely cast or cast within the same \"kind\".\n*\n* @module @stdlib/ndarray-same-kind-casts\n*\n* @example\n* var sameKindCasts = require( '@stdlib/ndarray-same-kind-casts' );\n*\n* var list = sameKindCasts( 'float32' );\n* // returns [...]\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n"],
|
|
5
|
+
"mappings": "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",
|
|
6
6
|
"names": ["require_same_kind_casts", "__commonJSMin", "exports", "module", "require_main", "__commonJSMin", "exports", "module", "objectKeys", "hasOwnProp", "resolve", "SAME_KIND_CASTS", "TABLE", "generateFullTable", "dtypes", "ntypes", "out", "tmp", "dt1", "dt2", "o", "j", "i", "generateTable", "sameKindCasts", "dtype", "main"]
|
|
7
7
|
}
|
|
@@ -41,9 +41,11 @@ const int8_t STDLIB_NDARRAY_SAME_KIND_CASTS_FLOAT64[ STDLIB_NDARRAY_NDTYPES ] =
|
|
|
41
41
|
[ STDLIB_NDARRAY_INT64 ] = 0,
|
|
42
42
|
[ STDLIB_NDARRAY_UINT64 ] = 0,
|
|
43
43
|
|
|
44
|
+
[ STDLIB_NDARRAY_FLOAT16 ] = 1,
|
|
44
45
|
[ STDLIB_NDARRAY_FLOAT32 ] = 1,
|
|
45
46
|
[ STDLIB_NDARRAY_FLOAT64 ] = 1,
|
|
46
47
|
|
|
48
|
+
[ STDLIB_NDARRAY_COMPLEX32 ] = 0,
|
|
47
49
|
[ STDLIB_NDARRAY_COMPLEX64 ] = 0,
|
|
48
50
|
[ STDLIB_NDARRAY_COMPLEX128 ] = 1,
|
|
49
51
|
|
|
@@ -65,9 +67,37 @@ const int8_t STDLIB_NDARRAY_SAME_KIND_CASTS_FLOAT32[ STDLIB_NDARRAY_NDTYPES ] =
|
|
|
65
67
|
[ STDLIB_NDARRAY_INT64 ] = 0,
|
|
66
68
|
[ STDLIB_NDARRAY_UINT64 ] = 0,
|
|
67
69
|
|
|
70
|
+
[ STDLIB_NDARRAY_FLOAT16 ] = 1,
|
|
68
71
|
[ STDLIB_NDARRAY_FLOAT32 ] = 1,
|
|
69
72
|
[ STDLIB_NDARRAY_FLOAT64 ] = 1,
|
|
70
73
|
|
|
74
|
+
[ STDLIB_NDARRAY_COMPLEX32 ] = 0,
|
|
75
|
+
[ STDLIB_NDARRAY_COMPLEX64 ] = 1,
|
|
76
|
+
[ STDLIB_NDARRAY_COMPLEX128 ] = 1,
|
|
77
|
+
|
|
78
|
+
[ STDLIB_NDARRAY_BOOL ] = 0,
|
|
79
|
+
|
|
80
|
+
[ STDLIB_NDARRAY_BINARY ] = 0,
|
|
81
|
+
[ STDLIB_NDARRAY_GENERIC ] = 0
|
|
82
|
+
};
|
|
83
|
+
|
|
84
|
+
const int8_t STDLIB_NDARRAY_SAME_KIND_CASTS_FLOAT16[ STDLIB_NDARRAY_NDTYPES ] = {
|
|
85
|
+
|
|
86
|
+
[ STDLIB_NDARRAY_INT8 ] = 0,
|
|
87
|
+
[ STDLIB_NDARRAY_UINT8 ] = 0,
|
|
88
|
+
[ STDLIB_NDARRAY_UINT8C ] = 0,
|
|
89
|
+
[ STDLIB_NDARRAY_INT16 ] = 0,
|
|
90
|
+
[ STDLIB_NDARRAY_UINT16 ] = 0,
|
|
91
|
+
[ STDLIB_NDARRAY_INT32 ] = 0,
|
|
92
|
+
[ STDLIB_NDARRAY_UINT32 ] = 0,
|
|
93
|
+
[ STDLIB_NDARRAY_INT64 ] = 0,
|
|
94
|
+
[ STDLIB_NDARRAY_UINT64 ] = 0,
|
|
95
|
+
|
|
96
|
+
[ STDLIB_NDARRAY_FLOAT16 ] = 1,
|
|
97
|
+
[ STDLIB_NDARRAY_FLOAT32 ] = 1,
|
|
98
|
+
[ STDLIB_NDARRAY_FLOAT64 ] = 1,
|
|
99
|
+
|
|
100
|
+
[ STDLIB_NDARRAY_COMPLEX32 ] = 1,
|
|
71
101
|
[ STDLIB_NDARRAY_COMPLEX64 ] = 1,
|
|
72
102
|
[ STDLIB_NDARRAY_COMPLEX128 ] = 1,
|
|
73
103
|
|
|
@@ -89,9 +119,11 @@ const int8_t STDLIB_NDARRAY_SAME_KIND_CASTS_UINT64[ STDLIB_NDARRAY_NDTYPES ] = {
|
|
|
89
119
|
[ STDLIB_NDARRAY_INT64 ] = 0,
|
|
90
120
|
[ STDLIB_NDARRAY_UINT64 ] = 1,
|
|
91
121
|
|
|
122
|
+
[ STDLIB_NDARRAY_FLOAT16 ] = 0,
|
|
92
123
|
[ STDLIB_NDARRAY_FLOAT32 ] = 0,
|
|
93
124
|
[ STDLIB_NDARRAY_FLOAT64 ] = 0,
|
|
94
125
|
|
|
126
|
+
[ STDLIB_NDARRAY_COMPLEX32 ] = 0,
|
|
95
127
|
[ STDLIB_NDARRAY_COMPLEX64 ] = 0,
|
|
96
128
|
[ STDLIB_NDARRAY_COMPLEX128 ] = 0,
|
|
97
129
|
|
|
@@ -113,9 +145,11 @@ const int8_t STDLIB_NDARRAY_SAME_KIND_CASTS_INT64[ STDLIB_NDARRAY_NDTYPES ] = {
|
|
|
113
145
|
[ STDLIB_NDARRAY_INT64 ] = 1,
|
|
114
146
|
[ STDLIB_NDARRAY_UINT64 ] = 0,
|
|
115
147
|
|
|
148
|
+
[ STDLIB_NDARRAY_FLOAT16 ] = 0,
|
|
116
149
|
[ STDLIB_NDARRAY_FLOAT32 ] = 0,
|
|
117
150
|
[ STDLIB_NDARRAY_FLOAT64 ] = 0,
|
|
118
151
|
|
|
152
|
+
[ STDLIB_NDARRAY_COMPLEX32 ] = 0,
|
|
119
153
|
[ STDLIB_NDARRAY_COMPLEX64 ] = 0,
|
|
120
154
|
[ STDLIB_NDARRAY_COMPLEX128 ] = 0,
|
|
121
155
|
|
|
@@ -137,9 +171,11 @@ const int8_t STDLIB_NDARRAY_SAME_KIND_CASTS_UINT32[ STDLIB_NDARRAY_NDTYPES ] = {
|
|
|
137
171
|
[ STDLIB_NDARRAY_INT64 ] = 1,
|
|
138
172
|
[ STDLIB_NDARRAY_UINT64 ] = 1,
|
|
139
173
|
|
|
174
|
+
[ STDLIB_NDARRAY_FLOAT16 ] = 0,
|
|
140
175
|
[ STDLIB_NDARRAY_FLOAT32 ] = 0,
|
|
141
176
|
[ STDLIB_NDARRAY_FLOAT64 ] = 1,
|
|
142
177
|
|
|
178
|
+
[ STDLIB_NDARRAY_COMPLEX32 ] = 0,
|
|
143
179
|
[ STDLIB_NDARRAY_COMPLEX64 ] = 0,
|
|
144
180
|
[ STDLIB_NDARRAY_COMPLEX128 ] = 1,
|
|
145
181
|
|
|
@@ -161,9 +197,11 @@ const int8_t STDLIB_NDARRAY_SAME_KIND_CASTS_INT32[ STDLIB_NDARRAY_NDTYPES ] = {
|
|
|
161
197
|
[ STDLIB_NDARRAY_INT64 ] = 1,
|
|
162
198
|
[ STDLIB_NDARRAY_UINT64 ] = 0,
|
|
163
199
|
|
|
200
|
+
[ STDLIB_NDARRAY_FLOAT16 ] = 0,
|
|
164
201
|
[ STDLIB_NDARRAY_FLOAT32 ] = 0,
|
|
165
202
|
[ STDLIB_NDARRAY_FLOAT64 ] = 1,
|
|
166
203
|
|
|
204
|
+
[ STDLIB_NDARRAY_COMPLEX32 ] = 0,
|
|
167
205
|
[ STDLIB_NDARRAY_COMPLEX64 ] = 0,
|
|
168
206
|
[ STDLIB_NDARRAY_COMPLEX128 ] = 1,
|
|
169
207
|
|
|
@@ -185,9 +223,11 @@ const int8_t STDLIB_NDARRAY_SAME_KIND_CASTS_UINT16[ STDLIB_NDARRAY_NDTYPES ] = {
|
|
|
185
223
|
[ STDLIB_NDARRAY_INT64 ] = 1,
|
|
186
224
|
[ STDLIB_NDARRAY_UINT64 ] = 1,
|
|
187
225
|
|
|
226
|
+
[ STDLIB_NDARRAY_FLOAT16 ] = 0,
|
|
188
227
|
[ STDLIB_NDARRAY_FLOAT32 ] = 1,
|
|
189
228
|
[ STDLIB_NDARRAY_FLOAT64 ] = 1,
|
|
190
229
|
|
|
230
|
+
[ STDLIB_NDARRAY_COMPLEX32 ] = 0,
|
|
191
231
|
[ STDLIB_NDARRAY_COMPLEX64 ] = 1,
|
|
192
232
|
[ STDLIB_NDARRAY_COMPLEX128 ] = 1,
|
|
193
233
|
|
|
@@ -209,9 +249,11 @@ const int8_t STDLIB_NDARRAY_SAME_KIND_CASTS_INT16[ STDLIB_NDARRAY_NDTYPES ] = {
|
|
|
209
249
|
[ STDLIB_NDARRAY_INT64 ] = 1,
|
|
210
250
|
[ STDLIB_NDARRAY_UINT64 ] = 0,
|
|
211
251
|
|
|
252
|
+
[ STDLIB_NDARRAY_FLOAT16 ] = 0,
|
|
212
253
|
[ STDLIB_NDARRAY_FLOAT32 ] = 1,
|
|
213
254
|
[ STDLIB_NDARRAY_FLOAT64 ] = 1,
|
|
214
255
|
|
|
256
|
+
[ STDLIB_NDARRAY_COMPLEX32 ] = 0,
|
|
215
257
|
[ STDLIB_NDARRAY_COMPLEX64 ] = 1,
|
|
216
258
|
[ STDLIB_NDARRAY_COMPLEX128 ] = 1,
|
|
217
259
|
|
|
@@ -233,9 +275,11 @@ const int8_t STDLIB_NDARRAY_SAME_KIND_CASTS_UINT8[ STDLIB_NDARRAY_NDTYPES ] = {
|
|
|
233
275
|
[ STDLIB_NDARRAY_INT64 ] = 1,
|
|
234
276
|
[ STDLIB_NDARRAY_UINT64 ] = 1,
|
|
235
277
|
|
|
278
|
+
[ STDLIB_NDARRAY_FLOAT16 ] = 1,
|
|
236
279
|
[ STDLIB_NDARRAY_FLOAT32 ] = 1,
|
|
237
280
|
[ STDLIB_NDARRAY_FLOAT64 ] = 1,
|
|
238
281
|
|
|
282
|
+
[ STDLIB_NDARRAY_COMPLEX32 ] = 1,
|
|
239
283
|
[ STDLIB_NDARRAY_COMPLEX64 ] = 1,
|
|
240
284
|
[ STDLIB_NDARRAY_COMPLEX128 ] = 1,
|
|
241
285
|
|
|
@@ -257,9 +301,11 @@ const int8_t STDLIB_NDARRAY_SAME_KIND_CASTS_UINT8C[ STDLIB_NDARRAY_NDTYPES ] = {
|
|
|
257
301
|
[ STDLIB_NDARRAY_INT64 ] = 1,
|
|
258
302
|
[ STDLIB_NDARRAY_UINT64 ] = 1,
|
|
259
303
|
|
|
304
|
+
[ STDLIB_NDARRAY_FLOAT16 ] = 1,
|
|
260
305
|
[ STDLIB_NDARRAY_FLOAT32 ] = 1,
|
|
261
306
|
[ STDLIB_NDARRAY_FLOAT64 ] = 1,
|
|
262
307
|
|
|
308
|
+
[ STDLIB_NDARRAY_COMPLEX32 ] = 1,
|
|
263
309
|
[ STDLIB_NDARRAY_COMPLEX64 ] = 1,
|
|
264
310
|
[ STDLIB_NDARRAY_COMPLEX128 ] = 1,
|
|
265
311
|
|
|
@@ -281,9 +327,11 @@ const int8_t STDLIB_NDARRAY_SAME_KIND_CASTS_INT8[ STDLIB_NDARRAY_NDTYPES ] = {
|
|
|
281
327
|
[ STDLIB_NDARRAY_INT64 ] = 1,
|
|
282
328
|
[ STDLIB_NDARRAY_UINT64 ] = 0,
|
|
283
329
|
|
|
330
|
+
[ STDLIB_NDARRAY_FLOAT16 ] = 1,
|
|
284
331
|
[ STDLIB_NDARRAY_FLOAT32 ] = 1,
|
|
285
332
|
[ STDLIB_NDARRAY_FLOAT64 ] = 1,
|
|
286
333
|
|
|
334
|
+
[ STDLIB_NDARRAY_COMPLEX32 ] = 1,
|
|
287
335
|
[ STDLIB_NDARRAY_COMPLEX64 ] = 1,
|
|
288
336
|
[ STDLIB_NDARRAY_COMPLEX128 ] = 1,
|
|
289
337
|
|
|
@@ -305,9 +353,11 @@ const int8_t STDLIB_NDARRAY_SAME_KIND_CASTS_BOOL[ STDLIB_NDARRAY_NDTYPES ] = {
|
|
|
305
353
|
[ STDLIB_NDARRAY_INT64 ] = 0,
|
|
306
354
|
[ STDLIB_NDARRAY_UINT64 ] = 0,
|
|
307
355
|
|
|
356
|
+
[ STDLIB_NDARRAY_FLOAT16 ] = 0,
|
|
308
357
|
[ STDLIB_NDARRAY_FLOAT32 ] = 0,
|
|
309
358
|
[ STDLIB_NDARRAY_FLOAT64 ] = 0,
|
|
310
359
|
|
|
360
|
+
[ STDLIB_NDARRAY_COMPLEX32 ] = 0,
|
|
311
361
|
[ STDLIB_NDARRAY_COMPLEX64 ] = 0,
|
|
312
362
|
[ STDLIB_NDARRAY_COMPLEX128 ] = 0,
|
|
313
363
|
|
|
@@ -329,9 +379,11 @@ const int8_t STDLIB_NDARRAY_SAME_KIND_CASTS_COMPLEX128[ STDLIB_NDARRAY_NDTYPES ]
|
|
|
329
379
|
[ STDLIB_NDARRAY_INT64 ] = 0,
|
|
330
380
|
[ STDLIB_NDARRAY_UINT64 ] = 0,
|
|
331
381
|
|
|
382
|
+
[ STDLIB_NDARRAY_FLOAT16 ] = 0,
|
|
332
383
|
[ STDLIB_NDARRAY_FLOAT32 ] = 0,
|
|
333
384
|
[ STDLIB_NDARRAY_FLOAT64 ] = 0,
|
|
334
385
|
|
|
386
|
+
[ STDLIB_NDARRAY_COMPLEX32 ] = 1,
|
|
335
387
|
[ STDLIB_NDARRAY_COMPLEX64 ] = 1,
|
|
336
388
|
[ STDLIB_NDARRAY_COMPLEX128 ] = 1,
|
|
337
389
|
|
|
@@ -353,9 +405,37 @@ const int8_t STDLIB_NDARRAY_SAME_KIND_CASTS_COMPLEX64[ STDLIB_NDARRAY_NDTYPES ]
|
|
|
353
405
|
[ STDLIB_NDARRAY_INT64 ] = 0,
|
|
354
406
|
[ STDLIB_NDARRAY_UINT64 ] = 0,
|
|
355
407
|
|
|
408
|
+
[ STDLIB_NDARRAY_FLOAT16 ] = 0,
|
|
409
|
+
[ STDLIB_NDARRAY_FLOAT32 ] = 0,
|
|
410
|
+
[ STDLIB_NDARRAY_FLOAT64 ] = 0,
|
|
411
|
+
|
|
412
|
+
[ STDLIB_NDARRAY_COMPLEX32 ] = 1,
|
|
413
|
+
[ STDLIB_NDARRAY_COMPLEX64 ] = 1,
|
|
414
|
+
[ STDLIB_NDARRAY_COMPLEX128 ] = 1,
|
|
415
|
+
|
|
416
|
+
[ STDLIB_NDARRAY_BOOL ] = 0,
|
|
417
|
+
|
|
418
|
+
[ STDLIB_NDARRAY_BINARY ] = 0,
|
|
419
|
+
[ STDLIB_NDARRAY_GENERIC ] = 0
|
|
420
|
+
};
|
|
421
|
+
|
|
422
|
+
const int8_t STDLIB_NDARRAY_SAME_KIND_CASTS_COMPLEX32[ STDLIB_NDARRAY_NDTYPES ] = {
|
|
423
|
+
|
|
424
|
+
[ STDLIB_NDARRAY_INT8 ] = 0,
|
|
425
|
+
[ STDLIB_NDARRAY_UINT8 ] = 0,
|
|
426
|
+
[ STDLIB_NDARRAY_UINT8C ] = 0,
|
|
427
|
+
[ STDLIB_NDARRAY_INT16 ] = 0,
|
|
428
|
+
[ STDLIB_NDARRAY_UINT16 ] = 0,
|
|
429
|
+
[ STDLIB_NDARRAY_INT32 ] = 0,
|
|
430
|
+
[ STDLIB_NDARRAY_UINT32 ] = 0,
|
|
431
|
+
[ STDLIB_NDARRAY_INT64 ] = 0,
|
|
432
|
+
[ STDLIB_NDARRAY_UINT64 ] = 0,
|
|
433
|
+
|
|
434
|
+
[ STDLIB_NDARRAY_FLOAT16 ] = 0,
|
|
356
435
|
[ STDLIB_NDARRAY_FLOAT32 ] = 0,
|
|
357
436
|
[ STDLIB_NDARRAY_FLOAT64 ] = 0,
|
|
358
437
|
|
|
438
|
+
[ STDLIB_NDARRAY_COMPLEX32 ] = 1,
|
|
359
439
|
[ STDLIB_NDARRAY_COMPLEX64 ] = 1,
|
|
360
440
|
[ STDLIB_NDARRAY_COMPLEX128 ] = 1,
|
|
361
441
|
|
|
@@ -377,9 +457,11 @@ const int8_t STDLIB_NDARRAY_SAME_KIND_CASTS_BINARY[ STDLIB_NDARRAY_NDTYPES ] = {
|
|
|
377
457
|
[ STDLIB_NDARRAY_INT64 ] = 0,
|
|
378
458
|
[ STDLIB_NDARRAY_UINT64 ] = 0,
|
|
379
459
|
|
|
460
|
+
[ STDLIB_NDARRAY_FLOAT16 ] = 0,
|
|
380
461
|
[ STDLIB_NDARRAY_FLOAT32 ] = 0,
|
|
381
462
|
[ STDLIB_NDARRAY_FLOAT64 ] = 0,
|
|
382
463
|
|
|
464
|
+
[ STDLIB_NDARRAY_COMPLEX32 ] = 0,
|
|
383
465
|
[ STDLIB_NDARRAY_COMPLEX64 ] = 0,
|
|
384
466
|
[ STDLIB_NDARRAY_COMPLEX128 ] = 0,
|
|
385
467
|
|
|
@@ -401,9 +483,11 @@ const int8_t STDLIB_NDARRAY_SAME_KIND_CASTS_GENERIC[ STDLIB_NDARRAY_NDTYPES ] =
|
|
|
401
483
|
[ STDLIB_NDARRAY_INT64 ] = 0,
|
|
402
484
|
[ STDLIB_NDARRAY_UINT64 ] = 0,
|
|
403
485
|
|
|
486
|
+
[ STDLIB_NDARRAY_FLOAT16 ] = 0,
|
|
404
487
|
[ STDLIB_NDARRAY_FLOAT32 ] = 0,
|
|
405
488
|
[ STDLIB_NDARRAY_FLOAT64 ] = 0,
|
|
406
489
|
|
|
490
|
+
[ STDLIB_NDARRAY_COMPLEX32 ] = 0,
|
|
407
491
|
[ STDLIB_NDARRAY_COMPLEX64 ] = 0,
|
|
408
492
|
[ STDLIB_NDARRAY_COMPLEX128 ] = 0,
|
|
409
493
|
|
|
@@ -426,9 +510,11 @@ const int8_t *STDLIB_NDARRAY_SAME_KIND_CASTS[ STDLIB_NDARRAY_NDTYPES ] = {
|
|
|
426
510
|
[ STDLIB_NDARRAY_INT64 ] = STDLIB_NDARRAY_SAME_KIND_CASTS_INT64,
|
|
427
511
|
[ STDLIB_NDARRAY_UINT64 ] = STDLIB_NDARRAY_SAME_KIND_CASTS_UINT64,
|
|
428
512
|
|
|
513
|
+
[ STDLIB_NDARRAY_FLOAT16 ] = STDLIB_NDARRAY_SAME_KIND_CASTS_FLOAT16,
|
|
429
514
|
[ STDLIB_NDARRAY_FLOAT32 ] = STDLIB_NDARRAY_SAME_KIND_CASTS_FLOAT32,
|
|
430
515
|
[ STDLIB_NDARRAY_FLOAT64 ] = STDLIB_NDARRAY_SAME_KIND_CASTS_FLOAT64,
|
|
431
516
|
|
|
517
|
+
[ STDLIB_NDARRAY_COMPLEX32 ] = STDLIB_NDARRAY_SAME_KIND_CASTS_COMPLEX32,
|
|
432
518
|
[ STDLIB_NDARRAY_COMPLEX64 ] = STDLIB_NDARRAY_SAME_KIND_CASTS_COMPLEX64,
|
|
433
519
|
[ STDLIB_NDARRAY_COMPLEX128 ] = STDLIB_NDARRAY_SAME_KIND_CASTS_COMPLEX128,
|
|
434
520
|
|
package/lib/same_kind_casts.json
CHANGED
|
@@ -1,197 +1,362 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
2
|
+
"float64": {
|
|
3
|
+
"float64": 1,
|
|
4
|
+
"float32": 1,
|
|
5
|
+
"float16": 1,
|
|
6
|
+
"int64": 0,
|
|
7
|
+
"int32": 0,
|
|
8
|
+
"int16": 0,
|
|
9
|
+
"int8": 0,
|
|
10
|
+
"uint64": 0,
|
|
11
|
+
"uint32": 0,
|
|
12
|
+
"uint16": 0,
|
|
13
|
+
"uint8": 0,
|
|
14
|
+
"uint8c": 0,
|
|
15
|
+
"complex128": 1,
|
|
16
|
+
"complex64": 0,
|
|
17
|
+
"complex32": 0,
|
|
18
|
+
"binary": 0,
|
|
19
|
+
"generic": 1,
|
|
20
|
+
"bool": 0
|
|
21
|
+
},
|
|
22
|
+
"float32": {
|
|
23
|
+
"float64": 1,
|
|
24
|
+
"float32": 1,
|
|
25
|
+
"float16": 1,
|
|
26
|
+
"int64": 0,
|
|
27
|
+
"int32": 0,
|
|
28
|
+
"int16": 0,
|
|
29
|
+
"int8": 0,
|
|
30
|
+
"uint64": 0,
|
|
31
|
+
"uint32": 0,
|
|
32
|
+
"uint16": 0,
|
|
33
|
+
"uint8": 0,
|
|
34
|
+
"uint8c": 0,
|
|
35
|
+
"complex128": 1,
|
|
36
|
+
"complex64": 1,
|
|
37
|
+
"complex32": 0,
|
|
38
|
+
"binary": 0,
|
|
39
|
+
"generic": 1,
|
|
40
|
+
"bool": 0
|
|
41
|
+
},
|
|
42
|
+
"float16": {
|
|
43
|
+
"float64": 1,
|
|
44
|
+
"float32": 1,
|
|
45
|
+
"float16": 1,
|
|
46
|
+
"int64": 0,
|
|
47
|
+
"int32": 0,
|
|
48
|
+
"int16": 0,
|
|
49
|
+
"int8": 0,
|
|
50
|
+
"uint64": 0,
|
|
51
|
+
"uint32": 0,
|
|
52
|
+
"uint16": 0,
|
|
53
|
+
"uint8": 0,
|
|
54
|
+
"uint8c": 0,
|
|
55
|
+
"complex128": 1,
|
|
56
|
+
"complex64": 1,
|
|
57
|
+
"complex32": 1,
|
|
58
|
+
"binary": 0,
|
|
59
|
+
"generic": 1,
|
|
60
|
+
"bool": 0
|
|
61
|
+
},
|
|
62
|
+
"int64": {
|
|
63
|
+
"float64": 0,
|
|
64
|
+
"float32": 0,
|
|
65
|
+
"float16": 0,
|
|
66
|
+
"int64": 1,
|
|
67
|
+
"int32": 1,
|
|
68
|
+
"int16": 1,
|
|
69
|
+
"int8": 1,
|
|
70
|
+
"uint64": 0,
|
|
71
|
+
"uint32": 0,
|
|
72
|
+
"uint16": 0,
|
|
73
|
+
"uint8": 0,
|
|
74
|
+
"uint8c": 0,
|
|
75
|
+
"complex128": 0,
|
|
76
|
+
"complex64": 0,
|
|
77
|
+
"complex32": 0,
|
|
78
|
+
"binary": 0,
|
|
79
|
+
"generic": 1,
|
|
80
|
+
"bool": 0
|
|
81
|
+
},
|
|
82
|
+
"int32": {
|
|
83
|
+
"float64": 1,
|
|
84
|
+
"float32": 0,
|
|
85
|
+
"float16": 0,
|
|
86
|
+
"int64": 1,
|
|
87
|
+
"int32": 1,
|
|
88
|
+
"int16": 1,
|
|
89
|
+
"int8": 1,
|
|
90
|
+
"uint64": 0,
|
|
91
|
+
"uint32": 0,
|
|
92
|
+
"uint16": 0,
|
|
93
|
+
"uint8": 0,
|
|
94
|
+
"uint8c": 0,
|
|
95
|
+
"complex128": 1,
|
|
96
|
+
"complex64": 0,
|
|
97
|
+
"complex32": 0,
|
|
98
|
+
"binary": 0,
|
|
99
|
+
"generic": 1,
|
|
100
|
+
"bool": 0
|
|
101
|
+
},
|
|
102
|
+
"int16": {
|
|
103
|
+
"float64": 1,
|
|
104
|
+
"float32": 1,
|
|
105
|
+
"float16": 0,
|
|
106
|
+
"int64": 1,
|
|
107
|
+
"int32": 1,
|
|
108
|
+
"int16": 1,
|
|
109
|
+
"int8": 1,
|
|
110
|
+
"uint64": 0,
|
|
111
|
+
"uint32": 0,
|
|
112
|
+
"uint16": 0,
|
|
113
|
+
"uint8": 0,
|
|
114
|
+
"uint8c": 0,
|
|
115
|
+
"complex128": 1,
|
|
116
|
+
"complex64": 1,
|
|
117
|
+
"complex32": 0,
|
|
118
|
+
"binary": 0,
|
|
119
|
+
"generic": 1,
|
|
120
|
+
"bool": 0
|
|
121
|
+
},
|
|
122
|
+
"int8": {
|
|
123
|
+
"float64": 1,
|
|
124
|
+
"float32": 1,
|
|
125
|
+
"float16": 1,
|
|
126
|
+
"int64": 1,
|
|
127
|
+
"int32": 1,
|
|
128
|
+
"int16": 1,
|
|
129
|
+
"int8": 1,
|
|
130
|
+
"uint64": 0,
|
|
131
|
+
"uint32": 0,
|
|
132
|
+
"uint16": 0,
|
|
133
|
+
"uint8": 0,
|
|
134
|
+
"uint8c": 0,
|
|
135
|
+
"complex128": 1,
|
|
136
|
+
"complex64": 1,
|
|
137
|
+
"complex32": 0,
|
|
138
|
+
"binary": 0,
|
|
139
|
+
"generic": 1,
|
|
140
|
+
"bool": 0
|
|
141
|
+
},
|
|
142
|
+
"uint64": {
|
|
143
|
+
"float64": 0,
|
|
144
|
+
"float32": 0,
|
|
145
|
+
"float16": 0,
|
|
146
|
+
"int64": 0,
|
|
147
|
+
"int32": 0,
|
|
148
|
+
"int16": 0,
|
|
149
|
+
"int8": 0,
|
|
150
|
+
"uint64": 1,
|
|
151
|
+
"uint32": 1,
|
|
152
|
+
"uint16": 1,
|
|
153
|
+
"uint8": 1,
|
|
154
|
+
"uint8c": 1,
|
|
155
|
+
"complex128": 1,
|
|
156
|
+
"complex64": 0,
|
|
157
|
+
"complex32": 0,
|
|
158
|
+
"binary": 0,
|
|
159
|
+
"generic": 1,
|
|
160
|
+
"bool": 0
|
|
161
|
+
},
|
|
162
|
+
"uint32": {
|
|
163
|
+
"float64": 1,
|
|
164
|
+
"float32": 0,
|
|
165
|
+
"float16": 0,
|
|
166
|
+
"int64": 1,
|
|
167
|
+
"int32": 0,
|
|
168
|
+
"int16": 0,
|
|
169
|
+
"int8": 0,
|
|
170
|
+
"uint64": 1,
|
|
171
|
+
"uint32": 1,
|
|
172
|
+
"uint16": 1,
|
|
173
|
+
"uint8": 1,
|
|
174
|
+
"uint8c": 1,
|
|
175
|
+
"complex128": 1,
|
|
176
|
+
"complex64": 0,
|
|
177
|
+
"complex32": 0,
|
|
178
|
+
"binary": 0,
|
|
179
|
+
"generic": 1,
|
|
180
|
+
"bool": 0
|
|
181
|
+
},
|
|
182
|
+
"uint16": {
|
|
183
|
+
"float64": 1,
|
|
184
|
+
"float32": 1,
|
|
185
|
+
"float16": 0,
|
|
186
|
+
"int64": 1,
|
|
187
|
+
"int32": 1,
|
|
188
|
+
"int16": 0,
|
|
189
|
+
"int8": 0,
|
|
190
|
+
"uint64": 1,
|
|
191
|
+
"uint32": 1,
|
|
192
|
+
"uint16": 1,
|
|
193
|
+
"uint8": 1,
|
|
194
|
+
"uint8c": 1,
|
|
195
|
+
"complex128": 1,
|
|
196
|
+
"complex64": 1,
|
|
197
|
+
"complex32": 0,
|
|
198
|
+
"binary": 0,
|
|
199
|
+
"generic": 1,
|
|
200
|
+
"bool": 0
|
|
201
|
+
},
|
|
202
|
+
"uint8": {
|
|
203
|
+
"float64": 1,
|
|
204
|
+
"float32": 1,
|
|
205
|
+
"float16": 1,
|
|
206
|
+
"int64": 1,
|
|
207
|
+
"int32": 1,
|
|
208
|
+
"int16": 1,
|
|
209
|
+
"int8": 0,
|
|
210
|
+
"uint64": 1,
|
|
211
|
+
"uint32": 1,
|
|
212
|
+
"uint16": 1,
|
|
213
|
+
"uint8": 1,
|
|
214
|
+
"uint8c": 1,
|
|
215
|
+
"complex128": 1,
|
|
216
|
+
"complex64": 1,
|
|
217
|
+
"complex32": 1,
|
|
218
|
+
"binary": 0,
|
|
219
|
+
"generic": 1,
|
|
220
|
+
"bool": 0
|
|
221
|
+
},
|
|
222
|
+
"uint8c": {
|
|
223
|
+
"float64": 1,
|
|
224
|
+
"float32": 1,
|
|
225
|
+
"float16": 1,
|
|
226
|
+
"int64": 1,
|
|
227
|
+
"int32": 1,
|
|
228
|
+
"int16": 1,
|
|
229
|
+
"int8": 0,
|
|
230
|
+
"uint64": 1,
|
|
231
|
+
"uint32": 1,
|
|
232
|
+
"uint16": 1,
|
|
233
|
+
"uint8": 1,
|
|
234
|
+
"uint8c": 1,
|
|
235
|
+
"complex128": 1,
|
|
236
|
+
"complex64": 1,
|
|
237
|
+
"complex32": 1,
|
|
238
|
+
"binary": 0,
|
|
239
|
+
"generic": 1,
|
|
240
|
+
"bool": 0
|
|
241
|
+
},
|
|
242
|
+
"complex128": {
|
|
243
|
+
"float64": 0,
|
|
244
|
+
"float32": 0,
|
|
245
|
+
"float16": 0,
|
|
246
|
+
"int64": 0,
|
|
247
|
+
"int32": 0,
|
|
248
|
+
"int16": 0,
|
|
249
|
+
"int8": 0,
|
|
250
|
+
"uint64": 0,
|
|
251
|
+
"uint32": 0,
|
|
252
|
+
"uint16": 0,
|
|
253
|
+
"uint8": 0,
|
|
254
|
+
"uint8c": 0,
|
|
255
|
+
"complex128": 1,
|
|
256
|
+
"complex64": 1,
|
|
257
|
+
"complex32": 1,
|
|
258
|
+
"binary": 0,
|
|
259
|
+
"generic": 0,
|
|
260
|
+
"bool": 0
|
|
261
|
+
},
|
|
262
|
+
"complex64": {
|
|
263
|
+
"float64": 0,
|
|
264
|
+
"float32": 0,
|
|
265
|
+
"float16": 0,
|
|
266
|
+
"int64": 0,
|
|
267
|
+
"int32": 0,
|
|
268
|
+
"int16": 0,
|
|
269
|
+
"int8": 0,
|
|
270
|
+
"uint64": 0,
|
|
271
|
+
"uint32": 0,
|
|
272
|
+
"uint16": 0,
|
|
273
|
+
"uint8": 0,
|
|
274
|
+
"uint8c": 0,
|
|
275
|
+
"complex128": 1,
|
|
276
|
+
"complex64": 1,
|
|
277
|
+
"complex32": 1,
|
|
278
|
+
"binary": 0,
|
|
279
|
+
"generic": 0,
|
|
280
|
+
"bool": 0
|
|
281
|
+
},
|
|
282
|
+
"complex32": {
|
|
283
|
+
"float64": 0,
|
|
284
|
+
"float32": 0,
|
|
285
|
+
"float16": 0,
|
|
286
|
+
"int64": 0,
|
|
287
|
+
"int32": 0,
|
|
288
|
+
"int16": 0,
|
|
289
|
+
"int8": 0,
|
|
290
|
+
"uint64": 0,
|
|
291
|
+
"uint32": 0,
|
|
292
|
+
"uint16": 0,
|
|
293
|
+
"uint8": 0,
|
|
294
|
+
"uint8c": 0,
|
|
295
|
+
"complex128": 1,
|
|
296
|
+
"complex64": 1,
|
|
297
|
+
"complex32": 1,
|
|
298
|
+
"binary": 0,
|
|
299
|
+
"generic": 0,
|
|
300
|
+
"bool": 0
|
|
301
|
+
},
|
|
302
|
+
"generic": {
|
|
303
|
+
"float64": 0,
|
|
304
|
+
"float32": 0,
|
|
305
|
+
"float16": 0,
|
|
306
|
+
"int64": 0,
|
|
307
|
+
"int32": 0,
|
|
308
|
+
"int16": 0,
|
|
309
|
+
"int8": 0,
|
|
310
|
+
"uint64": 0,
|
|
311
|
+
"uint32": 0,
|
|
312
|
+
"uint16": 0,
|
|
313
|
+
"uint8": 0,
|
|
314
|
+
"uint8c": 0,
|
|
315
|
+
"complex128": 0,
|
|
316
|
+
"complex64": 0,
|
|
317
|
+
"complex32": 0,
|
|
318
|
+
"binary": 0,
|
|
319
|
+
"generic": 1,
|
|
320
|
+
"bool": 0
|
|
321
|
+
},
|
|
322
|
+
"binary": {
|
|
323
|
+
"float64": 0,
|
|
324
|
+
"float32": 0,
|
|
325
|
+
"float16": 0,
|
|
326
|
+
"int64": 0,
|
|
327
|
+
"int32": 0,
|
|
328
|
+
"int16": 0,
|
|
329
|
+
"int8": 0,
|
|
330
|
+
"uint64": 0,
|
|
331
|
+
"uint32": 0,
|
|
332
|
+
"uint16": 0,
|
|
333
|
+
"uint8": 0,
|
|
334
|
+
"uint8c": 0,
|
|
335
|
+
"complex128": 0,
|
|
336
|
+
"complex64": 0,
|
|
337
|
+
"complex32": 0,
|
|
338
|
+
"binary": 1,
|
|
339
|
+
"generic": 0,
|
|
340
|
+
"bool": 0
|
|
341
|
+
},
|
|
342
|
+
"bool": {
|
|
343
|
+
"float64": 0,
|
|
344
|
+
"float32": 0,
|
|
345
|
+
"float16": 0,
|
|
346
|
+
"int64": 0,
|
|
347
|
+
"int32": 0,
|
|
348
|
+
"int16": 0,
|
|
349
|
+
"int8": 0,
|
|
350
|
+
"uint64": 0,
|
|
351
|
+
"uint32": 0,
|
|
352
|
+
"uint16": 0,
|
|
353
|
+
"uint8": 0,
|
|
354
|
+
"uint8c": 0,
|
|
355
|
+
"complex128": 0,
|
|
356
|
+
"complex64": 0,
|
|
357
|
+
"complex32": 0,
|
|
358
|
+
"binary": 0,
|
|
359
|
+
"generic": 1,
|
|
360
|
+
"bool": 1
|
|
361
|
+
}
|
|
197
362
|
}
|
package/manifest.json
CHANGED
|
@@ -1,38 +1,38 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
2
|
+
"options": {},
|
|
3
|
+
"fields": [
|
|
4
|
+
{
|
|
5
|
+
"field": "src",
|
|
6
|
+
"resolve": true,
|
|
7
|
+
"relative": true
|
|
8
|
+
},
|
|
9
|
+
{
|
|
10
|
+
"field": "include",
|
|
11
|
+
"resolve": true,
|
|
12
|
+
"relative": true
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
"field": "libraries",
|
|
16
|
+
"resolve": false,
|
|
17
|
+
"relative": false
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"field": "libpath",
|
|
21
|
+
"resolve": true,
|
|
22
|
+
"relative": false
|
|
23
|
+
}
|
|
24
|
+
],
|
|
25
|
+
"confs": [
|
|
26
|
+
{
|
|
27
|
+
"src": [],
|
|
28
|
+
"include": [
|
|
29
|
+
"./include"
|
|
30
|
+
],
|
|
31
|
+
"libraries": [],
|
|
32
|
+
"libpath": [],
|
|
33
|
+
"dependencies": [
|
|
34
|
+
"@stdlib/ndarray-dtypes"
|
|
35
|
+
]
|
|
36
|
+
}
|
|
37
|
+
]
|
|
38
38
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stdlib/ndarray-same-kind-casts",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.0",
|
|
4
4
|
"description": "Return a list of ndarray data types to which a provided ndarray data type can be safely cast or cast within the same kind.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": {
|
|
@@ -31,10 +31,10 @@
|
|
|
31
31
|
"url": "https://github.com/stdlib-js/stdlib/issues"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@stdlib/assert-has-own-property": "^0.2.
|
|
35
|
-
"@stdlib/ndarray-base-dtype-resolve-str": "^0.2.
|
|
36
|
-
"@stdlib/ndarray-dtypes": "^0.
|
|
37
|
-
"@stdlib/utils-keys": "^0.2.
|
|
34
|
+
"@stdlib/assert-has-own-property": "^0.2.2",
|
|
35
|
+
"@stdlib/ndarray-base-dtype-resolve-str": "^0.2.2",
|
|
36
|
+
"@stdlib/ndarray-dtypes": "^0.3.0",
|
|
37
|
+
"@stdlib/utils-keys": "^0.2.2"
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {},
|
|
40
40
|
"engines": {
|
|
@@ -66,7 +66,6 @@
|
|
|
66
66
|
"utils",
|
|
67
67
|
"util"
|
|
68
68
|
],
|
|
69
|
-
"__stdlib__": {},
|
|
70
69
|
"funding": {
|
|
71
70
|
"type": "opencollective",
|
|
72
71
|
"url": "https://opencollective.com/stdlib"
|