Skip to content

chore: add a poc script for generating dtype combinations #7773

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 38 commits into
base: develop
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
56dab20
chore: initial script
gunjjoshi Jul 22, 2025
e1ce37b
feat: add script to generate addon.c and types.js
gunjjoshi Jul 23, 2025
4977f9e
refactor: remove script
gunjjoshi Jul 23, 2025
0d164cf
refactor: modify script
gunjjoshi Jul 23, 2025
d5b6478
Merge branch 'stdlib-js:develop' into ndarray-abs
gunjjoshi Jul 25, 2025
24ef2b0
Merge branch 'stdlib-js:develop' into ndarray-abs
gunjjoshi Jul 28, 2025
e287527
refactor: try out the script for ceil
gunjjoshi Jul 28, 2025
423b15e
refactor: update scripts
gunjjoshi Jul 29, 2025
9f25fb6
Merge branch 'stdlib-js:develop' into ndarray-abs
gunjjoshi Jul 29, 2025
cced8c1
Delete lib/node_modules/@stdlib/math/special/abs/scripts/test.js
gunjjoshi Jul 29, 2025
ff7deec
Delete lib/node_modules/@stdlib/math/special/abs/src/addon.c.txt
gunjjoshi Jul 29, 2025
807edcd
Update script.js
gunjjoshi Jul 29, 2025
e5dfa06
Merge branch 'stdlib-js:develop' into ndarray-abs
gunjjoshi Aug 3, 2025
34f340e
refactor: try new approach
gunjjoshi Aug 3, 2025
0ddf2f3
refactor: try newer approach
gunjjoshi Aug 8, 2025
6d25393
refactor: remove ceil
gunjjoshi Aug 8, 2025
e17871e
Merge branch 'stdlib-js:develop' into ndarray-abs
gunjjoshi Aug 11, 2025
557c8fc
chore: generate files for sin
gunjjoshi Aug 11, 2025
f77a874
Merge branch 'ndarray-abs' of https://github.com/gunjjoshi/stdlib int…
gunjjoshi Aug 11, 2025
5de19a6
Merge branch 'stdlib-js:develop' into ndarray-abs
gunjjoshi Aug 13, 2025
e759e6e
refactor: update script, try it out with floor
gunjjoshi Aug 13, 2025
030c100
docs: revert unwanted changes in package.json
gunjjoshi Aug 14, 2025
9d211a7
refactor: modify script
gunjjoshi Aug 19, 2025
9ab0db2
refactor: remove dtype_hierarchy.js
gunjjoshi Aug 19, 2025
16fda9d
feat: try the script for fibonacci
gunjjoshi Aug 19, 2025
e23d8e5
refactor: regenerate addon.c for fibonacci
gunjjoshi Aug 19, 2025
637de3c
refactor: modify script to exclude generic dtypes in addon
gunjjoshi Aug 20, 2025
6dc4f19
chore: regenerate files
gunjjoshi Aug 20, 2025
9c55af3
refactor: read whole scaffold object instead of only dtypes
gunjjoshi Aug 20, 2025
eae79f4
refactor: use new script for sin and sqrt
gunjjoshi Aug 20, 2025
f2edc8d
chore: add generated files for sin and sqrt
gunjjoshi Aug 20, 2025
877ef4e
refactor: remove trailing comma, add generic pair
gunjjoshi Aug 22, 2025
0741336
refactor: remove trailing comma, add generic pair
gunjjoshi Aug 22, 2025
d510064
chore: add generated files
gunjjoshi Aug 22, 2025
8603015
feat: generate data.js and meta.json too
gunjjoshi Aug 23, 2025
66c1315
feat: generate data.js and meta.json too
gunjjoshi Aug 23, 2025
58b7f7e
chore: add generated files
gunjjoshi Aug 23, 2025
b5a9e02
feat: generate types.json
gunjjoshi Aug 23, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 16 additions & 1 deletion lib/node_modules/@stdlib/math/base/special/cfloor/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,5 +66,20 @@
"complex",
"cmplx",
"number"
]
],"__stdlib__": {
"scaffold": {
"parameters": [
{
"type": {
"dtype": "complex128"
}
}
],
"returns": {
"type": {
"dtype": "complex128"
}
}
}
}
}
17 changes: 16 additions & 1 deletion lib/node_modules/@stdlib/math/base/special/cfloorf/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,5 +66,20 @@
"complex",
"cmplx",
"number"
]
],"__stdlib__": {
"scaffold": {
"parameters": [
{
"type": {
"dtype": "complex64"
}
}
],
"returns": {
"type": {
"dtype": "complex64"
}
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -62,5 +62,21 @@
"fibonacci",
"fib",
"number"
]
],
"__stdlib__": {
"scaffold": {
"parameters": [
{
"type": {
"dtype": "int32"
}
}
],
"returns": {
"type": {
"dtype": "float64"
}
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -62,5 +62,21 @@
"fibonaccif",
"fib",
"number"
]
],
"__stdlib__": {
"scaffold": {
"parameters": [
{
"type": {
"dtype": "int32"
}
}
],
"returns": {
"type": {
"dtype": "float32"
}
}
}
}
}
17 changes: 16 additions & 1 deletion lib/node_modules/@stdlib/math/base/special/floor/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,5 +66,20 @@
"double",
"double-precision",
"dbl"
]
],"__stdlib__": {
"scaffold": {
"parameters": [
{
"type": {
"dtype": "float64"
}
}
],
"returns": {
"type": {
"dtype": "float64"
}
}
}
}
}
17 changes: 16 additions & 1 deletion lib/node_modules/@stdlib/math/base/special/floorf/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,5 +66,20 @@
"float",
"single-precision",
"single"
]
],"__stdlib__": {
"scaffold": {
"parameters": [
{
"type": {
"dtype": "float32"
}
}
],
"returns": {
"type": {
"dtype": "float32"
}
}
}
}
}
17 changes: 16 additions & 1 deletion lib/node_modules/@stdlib/math/base/special/sin/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,5 +63,20 @@
"trigonometry",
"radians",
"angle"
]
],"__stdlib__": {
"scaffold": {
"parameters": [
{
"type": {
"dtype": "float64"
}
}
],
"returns": {
"type": {
"dtype": "float64"
}
}
}
}
}
17 changes: 16 additions & 1 deletion lib/node_modules/@stdlib/math/base/special/sqrt/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,5 +63,20 @@
"root",
"power",
"number"
]
],"__stdlib__": {
"scaffold": {
"parameters": [
{
"type": {
"dtype": "float64"
}
}
],
"returns": {
"type": {
"dtype": "float64"
}
}
}
}
}
17 changes: 16 additions & 1 deletion lib/node_modules/@stdlib/math/base/special/sqrtf/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,5 +63,20 @@
"root",
"power",
"number"
]
],"__stdlib__": {
"scaffold": {
"parameters": [
{
"type": {
"dtype": "float32"
}
}
],
"returns": {
"type": {
"dtype": "float32"
}
}
}
}
}
96 changes: 96 additions & 0 deletions lib/node_modules/@stdlib/math/special/fibonacci/lib/data.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
/**
* @license Apache-2.0
*
* Copyright (c) 2025 The Stdlib Authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

/* This is a generated file. Do not edit directly. */

/* eslint-disable stdlib/capitalized-comments */

'use strict';

// MODULES //

var fibonacci = require( '@stdlib/math/base/special/fibonacci' );
var fibonaccif = require( '@stdlib/math/base/special/fibonaccif' );


// MAIN //

var data = [
// NOTE: the following **must** match the order in `./types.js`. The order should be according to likelihood of use (e.g., if `float64` arrays are more likely, then `float64` types/data should come before `uint8`).

// float32
fibonacci,
fibonaccif,
fibonaccif,

// float64
fibonacci,
fibonacci,
fibonacci,

// int16
fibonacci,
fibonaccif,
fibonaccif,
fibonaccif,
fibonaccif,

// int32
fibonacci,
fibonaccif,
fibonaccif,

// int8
fibonacci,
fibonaccif,
fibonaccif,
fibonaccif,
fibonaccif,
fibonaccif,

// uint16
fibonacci,
fibonaccif,
fibonaccif,
fibonaccif,
fibonaccif,
fibonaccif,

// uint32
fibonacci,
fibonaccif,
fibonaccif,

// uint8
fibonacci,
fibonaccif,
fibonaccif,
fibonaccif,
fibonaccif,
fibonaccif,
fibonaccif,
fibonaccif,

// generic
fibonacci
];


// EXPORTS //

module.exports = data;
5 changes: 5 additions & 0 deletions lib/node_modules/@stdlib/math/special/fibonacci/lib/meta.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"nargs": 2,
"nin": 1,
"nout": 1
}
93 changes: 93 additions & 0 deletions lib/node_modules/@stdlib/math/special/fibonacci/lib/types.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
/**
* @license Apache-2.0
*
* Copyright (c) 2025 The Stdlib Authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

/* This is a generated file. Do not edit directly. */

/* eslint-disable array-element-newline */

'use strict';

// MODULES //

var dtypes = require( '@stdlib/ndarray/dtypes' );


// MAIN //

var types = [
// float32 (3)
dtypes.float32, dtypes.float64,
dtypes.float32, dtypes.float32,
dtypes.float32, dtypes.generic,

// float64 (3)
dtypes.float64, dtypes.float64,
dtypes.float64, dtypes.float32,
dtypes.float64, dtypes.generic,

// int16 (5)
dtypes.int16, dtypes.float64,
dtypes.int16, dtypes.float32,
dtypes.int16, dtypes.int32,
dtypes.int16, dtypes.int16,
dtypes.int16, dtypes.generic,

// int32 (3)
dtypes.int32, dtypes.float64,
dtypes.int32, dtypes.int32,
dtypes.int32, dtypes.generic,

// int8 (6)
dtypes.int8, dtypes.float64,
dtypes.int8, dtypes.float32,
dtypes.int8, dtypes.int32,
dtypes.int8, dtypes.int16,
dtypes.int8, dtypes.int8,
dtypes.int8, dtypes.generic,

// uint16 (6)
dtypes.uint16, dtypes.float64,
dtypes.uint16, dtypes.float32,
dtypes.uint16, dtypes.int32,
dtypes.uint16, dtypes.uint32,
dtypes.uint16, dtypes.uint16,
dtypes.uint16, dtypes.generic,

// uint32 (3)
dtypes.uint32, dtypes.float64,
dtypes.uint32, dtypes.uint32,
dtypes.uint32, dtypes.generic,

// uint8 (8)
dtypes.uint8, dtypes.float64,
dtypes.uint8, dtypes.float32,
dtypes.uint8, dtypes.int32,
dtypes.uint8, dtypes.int16,
dtypes.uint8, dtypes.uint32,
dtypes.uint8, dtypes.uint16,
dtypes.uint8, dtypes.uint8,
dtypes.uint8, dtypes.generic,

// generic (1)

Check warning on line 86 in lib/node_modules/@stdlib/math/special/fibonacci/lib/types.js

View workflow job for this annotation

GitHub Actions / Lint Changed Files

Comments should begin with an uppercase character
dtypes.generic, dtypes.generic
];


// EXPORTS //

module.exports = types;
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[11,12,11,11,11,17,12,12,12,11,12,17,4,12,4,11,4,6,4,4,4,17,6,12,6,6,6,17,1,12,1,11,1,6,1,4,1,1,1,17,5,12,5,11,5,6,5,7,5,5,5,17,7,12,7,7,7,17,2,12,2,11,2,6,2,4,2,7,2,5,2,2,2,17,17,17]
Loading
Loading