Skip to content

Commit 990ffea

Browse files
committed
Merge branch 'develop' of https://github.com/stdlib-js/stdlib into develop
2 parents 2eded73 + d965575 commit 990ffea

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

58 files changed

+1871
-397
lines changed
Lines changed: 149 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,149 @@
1+
[
2+
{
3+
"$schema": "math/[email protected]",
4+
"base_alias": "cbrt",
5+
"alias": "cbrt",
6+
"pkg_desc": "compute the cube root",
7+
"desc": "computes the cube root",
8+
"short_desc": "cube root",
9+
"parameters": [
10+
{
11+
"name": "x",
12+
"desc": "input value",
13+
"type": {
14+
"javascript": "number",
15+
"jsdoc": "number",
16+
"c": "double",
17+
"dtype": "float64"
18+
},
19+
"domain": [
20+
{
21+
"min": "-infinity",
22+
"max": "infinity"
23+
}
24+
],
25+
"rand": {
26+
"prng": "random/base/uniform",
27+
"parameters": [
28+
-10,
29+
10
30+
]
31+
},
32+
"example_values": [
33+
64,
34+
27,
35+
0,
36+
0,
37+
-9,
38+
8,
39+
-1,
40+
125,
41+
-10.2,
42+
11.3,
43+
-12.4,
44+
3.5,
45+
-1.6,
46+
15.7,
47+
-16,
48+
17.9,
49+
-188,
50+
19.11,
51+
-200,
52+
21.15
53+
]
54+
}
55+
],
56+
"returns": {
57+
"desc": "cube root",
58+
"type": {
59+
"javascript": "number",
60+
"jsdoc": "number",
61+
"c": "double",
62+
"dtype": "float64"
63+
}
64+
},
65+
"keywords": [
66+
"cube",
67+
"root",
68+
"cbrt",
69+
"cubic",
70+
"power"
71+
],
72+
"extra_keywords": [
73+
"math.cbrt"
74+
]
75+
},
76+
{
77+
"$schema": "math/[email protected]",
78+
"base_alias": "exp",
79+
"alias": "exp",
80+
"pkg_desc": "evaluate the natural exponential function",
81+
"desc": "evaluates the natural exponential function",
82+
"short_desc": "natural exponential function",
83+
"parameters": [
84+
{
85+
"name": "x",
86+
"desc": "input value",
87+
"type": {
88+
"javascript": "number",
89+
"jsdoc": "number",
90+
"c": "double",
91+
"dtype": "float64"
92+
},
93+
"domain": [
94+
{
95+
"min": "-infinity",
96+
"max": "infinity"
97+
}
98+
],
99+
"rand": {
100+
"prng": "random/base/uniform",
101+
"parameters": [
102+
-10,
103+
10
104+
]
105+
},
106+
"example_values": [
107+
-1.2,
108+
2,
109+
-3.1,
110+
-4.7,
111+
5.5,
112+
6.7,
113+
8.9,
114+
-10.2,
115+
11.3,
116+
-12.4,
117+
13.5,
118+
14.6,
119+
-15.7,
120+
16.8,
121+
-17.9,
122+
18.1,
123+
-19.11,
124+
20.12,
125+
-21.15,
126+
23.78
127+
]
128+
}
129+
],
130+
"returns": {
131+
"desc": "function value",
132+
"type": {
133+
"javascript": "number",
134+
"jsdoc": "number",
135+
"c": "double",
136+
"dtype": "float64"
137+
}
138+
},
139+
"keywords": [
140+
"natural",
141+
"exponential",
142+
"exp",
143+
"power"
144+
],
145+
"extra_keywords": [
146+
"math.exp"
147+
]
148+
}
149+
]
Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
#!/usr/bin/env node
2+
3+
/**
4+
* @license Apache-2.0
5+
*
6+
* Copyright (c) 2024 The Stdlib Authors.
7+
*
8+
* Licensed under the Apache License, Version 2.0 (the "License");
9+
* you may not use this file except in compliance with the License.
10+
* You may obtain a copy of the License at
11+
*
12+
* http://www.apache.org/licenses/LICENSE-2.0
13+
*
14+
* Unless required by applicable law or agreed to in writing, software
15+
* distributed under the License is distributed on an "AS IS" BASIS,
16+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17+
* See the License for the specific language governing permissions and
18+
* limitations under the License.
19+
*/
20+
21+
'use strict';
22+
23+
// MODULES //
24+
25+
var resolve = require( 'path' ).resolve;
26+
var findPkgs = require( '@stdlib/_tools/pkgs/find' ).sync;
27+
var readJSON = require( '@stdlib/fs/read-json' ).sync;
28+
var writeFile = require( '@stdlib/fs/write-file' ).sync;
29+
var rootDir = require( '@stdlib/_tools/utils/root-dir' );
30+
31+
32+
// VARIABLES //
33+
34+
var ROOT_DIR = rootDir();
35+
var opts = {
36+
'encoding': 'utf8'
37+
};
38+
39+
40+
// MAIN //
41+
42+
/**
43+
* Main execution sequence.
44+
*
45+
* @private
46+
*/
47+
function main() {
48+
var path;
49+
var json;
50+
var pkgs;
51+
var out;
52+
var o;
53+
var i;
54+
55+
// Resolve unary "special" math packages:
56+
pkgs = findPkgs({
57+
'dir': ROOT_DIR,
58+
'pattern': '**/math/base/special/*/package.json'
59+
});
60+
61+
// Filter for package's containing scaffold metadata and which have unary APIs...
62+
out = [];
63+
for ( i = 0; i < pkgs.length; i++ ) {
64+
path = resolve( ROOT_DIR, pkgs[i] );
65+
json = readJSON( resolve( path, 'package.json' ), opts );
66+
if ( json instanceof Error ) {
67+
console.error( 'Encountered an error when attempting to read package: %s. Error: %s.', pkgs[ i ], json.message );
68+
continue;
69+
}
70+
o = json.__stdlib__; // eslint-disable-line no-underscore-dangle
71+
if ( o && o.scaffold && o.scaffold.parameters.length === 1 ) {
72+
out.push( o.scaffold );
73+
}
74+
}
75+
// Write the metadata to a local file for subsequent consumption by other scripts:
76+
writeFile( resolve( __dirname, 'data.json' ), JSON.stringify( out, null, ' ' )+'\n', opts );
77+
}
78+
79+
main();

lib/node_modules/@stdlib/blas/base/daxpy/manifest.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,7 @@
134134
],
135135
"libpath": [],
136136
"dependencies": [
137+
"@stdlib/blas/base/shared",
137138
"@stdlib/strided/base/min-view-buffer-index"
138139
]
139140
},
@@ -154,6 +155,7 @@
154155
],
155156
"libpath": [],
156157
"dependencies": [
158+
"@stdlib/blas/base/shared",
157159
"@stdlib/strided/base/min-view-buffer-index"
158160
]
159161
},
@@ -262,6 +264,7 @@
262264
],
263265
"libpath": [],
264266
"dependencies": [
267+
"@stdlib/blas/base/shared",
265268
"@stdlib/strided/base/min-view-buffer-index"
266269
]
267270
},
@@ -281,6 +284,7 @@
281284
],
282285
"libpath": [],
283286
"dependencies": [
287+
"@stdlib/blas/base/shared",
284288
"@stdlib/strided/base/min-view-buffer-index"
285289
]
286290
},
@@ -328,6 +332,7 @@
328332
],
329333
"libpath": [],
330334
"dependencies": [
335+
"@stdlib/blas/base/shared",
331336
"@stdlib/strided/base/min-view-buffer-index"
332337
]
333338
},
@@ -348,6 +353,7 @@
348353
],
349354
"libpath": [],
350355
"dependencies": [
356+
"@stdlib/blas/base/shared",
351357
"@stdlib/strided/base/min-view-buffer-index"
352358
]
353359
},

0 commit comments

Comments
 (0)