Skip to content

Commit

Permalink
Merge branch 'develop' of https://github.com/stdlib-js/stdlib into de…
Browse files Browse the repository at this point in the history
…velop
  • Loading branch information
kgryte committed Sep 19, 2024
2 parents 2eded73 + d965575 commit 990ffea
Show file tree
Hide file tree
Showing 58 changed files with 1,871 additions and 397 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,149 @@
[
{
"$schema": "math/[email protected]",
"base_alias": "cbrt",
"alias": "cbrt",
"pkg_desc": "compute the cube root",
"desc": "computes the cube root",
"short_desc": "cube root",
"parameters": [
{
"name": "x",
"desc": "input value",
"type": {
"javascript": "number",
"jsdoc": "number",
"c": "double",
"dtype": "float64"
},
"domain": [
{
"min": "-infinity",
"max": "infinity"
}
],
"rand": {
"prng": "random/base/uniform",
"parameters": [
-10,
10
]
},
"example_values": [
64,
27,
0,
0,
-9,
8,
-1,
125,
-10.2,
11.3,
-12.4,
3.5,
-1.6,
15.7,
-16,
17.9,
-188,
19.11,
-200,
21.15
]
}
],
"returns": {
"desc": "cube root",
"type": {
"javascript": "number",
"jsdoc": "number",
"c": "double",
"dtype": "float64"
}
},
"keywords": [
"cube",
"root",
"cbrt",
"cubic",
"power"
],
"extra_keywords": [
"math.cbrt"
]
},
{
"$schema": "math/[email protected]",
"base_alias": "exp",
"alias": "exp",
"pkg_desc": "evaluate the natural exponential function",
"desc": "evaluates the natural exponential function",
"short_desc": "natural exponential function",
"parameters": [
{
"name": "x",
"desc": "input value",
"type": {
"javascript": "number",
"jsdoc": "number",
"c": "double",
"dtype": "float64"
},
"domain": [
{
"min": "-infinity",
"max": "infinity"
}
],
"rand": {
"prng": "random/base/uniform",
"parameters": [
-10,
10
]
},
"example_values": [
-1.2,
2,
-3.1,
-4.7,
5.5,
6.7,
8.9,
-10.2,
11.3,
-12.4,
13.5,
14.6,
-15.7,
16.8,
-17.9,
18.1,
-19.11,
20.12,
-21.15,
23.78
]
}
],
"returns": {
"desc": "function value",
"type": {
"javascript": "number",
"jsdoc": "number",
"c": "double",
"dtype": "float64"
}
},
"keywords": [
"natural",
"exponential",
"exp",
"power"
],
"extra_keywords": [
"math.exp"
]
}
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
#!/usr/bin/env node

/**
* @license Apache-2.0
*
* Copyright (c) 2024 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.
*/

'use strict';

// MODULES //

var resolve = require( 'path' ).resolve;
var findPkgs = require( '@stdlib/_tools/pkgs/find' ).sync;
var readJSON = require( '@stdlib/fs/read-json' ).sync;
var writeFile = require( '@stdlib/fs/write-file' ).sync;
var rootDir = require( '@stdlib/_tools/utils/root-dir' );


// VARIABLES //

var ROOT_DIR = rootDir();
var opts = {
'encoding': 'utf8'
};


// MAIN //

/**
* Main execution sequence.
*
* @private
*/
function main() {
var path;
var json;
var pkgs;
var out;
var o;
var i;

// Resolve unary "special" math packages:
pkgs = findPkgs({
'dir': ROOT_DIR,
'pattern': '**/math/base/special/*/package.json'
});

// Filter for package's containing scaffold metadata and which have unary APIs...
out = [];
for ( i = 0; i < pkgs.length; i++ ) {
path = resolve( ROOT_DIR, pkgs[i] );
json = readJSON( resolve( path, 'package.json' ), opts );
if ( json instanceof Error ) {
console.error( 'Encountered an error when attempting to read package: %s. Error: %s.', pkgs[ i ], json.message );

Check warning on line 67 in lib/node_modules/@stdlib/_tools/scaffold/math-iter-unary/scripts/generate_data.js

View workflow job for this annotation

GitHub Actions / Lint Changed Files

Unexpected console statement
continue;
}
o = json.__stdlib__; // eslint-disable-line no-underscore-dangle
if ( o && o.scaffold && o.scaffold.parameters.length === 1 ) {
out.push( o.scaffold );
}
}
// Write the metadata to a local file for subsequent consumption by other scripts:
writeFile( resolve( __dirname, 'data.json' ), JSON.stringify( out, null, ' ' )+'\n', opts );
}

main();
6 changes: 6 additions & 0 deletions lib/node_modules/@stdlib/blas/base/daxpy/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,7 @@
],
"libpath": [],
"dependencies": [
"@stdlib/blas/base/shared",
"@stdlib/strided/base/min-view-buffer-index"
]
},
Expand All @@ -154,6 +155,7 @@
],
"libpath": [],
"dependencies": [
"@stdlib/blas/base/shared",
"@stdlib/strided/base/min-view-buffer-index"
]
},
Expand Down Expand Up @@ -262,6 +264,7 @@
],
"libpath": [],
"dependencies": [
"@stdlib/blas/base/shared",
"@stdlib/strided/base/min-view-buffer-index"
]
},
Expand All @@ -281,6 +284,7 @@
],
"libpath": [],
"dependencies": [
"@stdlib/blas/base/shared",
"@stdlib/strided/base/min-view-buffer-index"
]
},
Expand Down Expand Up @@ -328,6 +332,7 @@
],
"libpath": [],
"dependencies": [
"@stdlib/blas/base/shared",
"@stdlib/strided/base/min-view-buffer-index"
]
},
Expand All @@ -348,6 +353,7 @@
],
"libpath": [],
"dependencies": [
"@stdlib/blas/base/shared",
"@stdlib/strided/base/min-view-buffer-index"
]
},
Expand Down
Loading

0 comments on commit 990ffea

Please sign in to comment.