Skip to content

Commit 5ea9f35

Browse files
committed
chore: add config for generating abs
--- type: pre_commit_static_analysis_report description: Results of running static analysis checks when committing changes. report: - task: lint_filenames status: passed - task: lint_editorconfig status: passed - task: lint_markdown status: na - task: lint_package_json status: passed - task: lint_repl_help status: na - task: lint_javascript_src status: na - task: lint_javascript_cli status: na - task: lint_javascript_examples status: na - task: lint_javascript_tests status: na - task: lint_javascript_benchmarks status: na - task: lint_python status: na - task: lint_r status: na - task: lint_c_src status: na - task: lint_c_examples status: na - task: lint_c_benchmarks status: na - task: lint_c_tests_fixtures status: na - task: lint_shell status: na - task: lint_typescript_declarations status: na - task: lint_typescript_tests status: na - task: lint_license_headers status: passed ---
1 parent b5a9e02 commit 5ea9f35

File tree

4 files changed

+267
-1
lines changed

4 files changed

+267
-1
lines changed

lib/node_modules/@stdlib/math/base/special/labs/package.json

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,5 +68,21 @@
6868
"32-bit",
6969
"32bit",
7070
"long"
71-
]
71+
],
72+
"__stdlib__": {
73+
"scaffold": {
74+
"parameters": [
75+
{
76+
"type": {
77+
"dtype": "int32"
78+
}
79+
}
80+
],
81+
"returns": {
82+
"type": {
83+
"dtype": "int32"
84+
}
85+
}
86+
}
87+
}
7288
}
Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
{
2+
"name": "@stdlib/math/special/abs",
3+
"version": "0.0.0",
4+
"description": "Compute the absolute value.",
5+
"license": "Apache-2.0",
6+
"author": {
7+
"name": "The Stdlib Authors",
8+
"url": "https://github.com/stdlib-js/stdlib/graphs/contributors"
9+
},
10+
"contributors": [
11+
{
12+
"name": "The Stdlib Authors",
13+
"url": "https://github.com/stdlib-js/stdlib/graphs/contributors"
14+
}
15+
],
16+
"main": "./lib",
17+
"browser": "./lib/main.js",
18+
"gypfile": true,
19+
"directories": {
20+
"benchmark": "./benchmark",
21+
"doc": "./docs",
22+
"example": "./examples",
23+
"lib": "./lib",
24+
"scripts": "./scripts",
25+
"src": "./src",
26+
"test": "./test"
27+
},
28+
"types": "./docs/types",
29+
"scripts": {},
30+
"homepage": "https://github.com/stdlib-js/stdlib",
31+
"repository": {
32+
"type": "git",
33+
"url": "git://github.com/stdlib-js/stdlib.git"
34+
},
35+
"bugs": {
36+
"url": "https://github.com/stdlib-js/stdlib/issues"
37+
},
38+
"dependencies": {},
39+
"devDependencies": {},
40+
"engines": {
41+
"node": ">=0.10.0",
42+
"npm": ">2.7.0"
43+
},
44+
"os": [
45+
"aix",
46+
"darwin",
47+
"freebsd",
48+
"linux",
49+
"macos",
50+
"openbsd",
51+
"sunos",
52+
"win32",
53+
"windows"
54+
],
55+
"keywords": [
56+
"stdlib",
57+
"stdmath",
58+
"mathematics",
59+
"math",
60+
"math.abs",
61+
"abs",
62+
"absolute",
63+
"magnitude",
64+
"value",
65+
"ndarray",
66+
"elementwise",
67+
"element-wise"
68+
],
69+
"__stdlib__": {}
70+
}

lib/node_modules/@stdlib/math/special/scripts/function_database.json

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,23 @@
6868
"float64": "@stdlib/math/base/special/fibonacci",
6969
"generic": "@stdlib/math/base/special/fibonacci"
7070
}
71+
},
72+
"abs": {
73+
"input_dtypes": "real_and_generic",
74+
"output_dtypes": "real_and_generic",
75+
"output_policy": "same",
76+
"excluded_dtypes": [ "float16", "int64", "uint64" ],
77+
"scalar_kernels": {
78+
"int8": "@stdlib/math/base/special/labs",
79+
"int16": "@stdlib/math/base/special/labs",
80+
"int32": "@stdlib/math/base/special/labs",
81+
"uint8": "@stdlib/number/uint8/base/identity",
82+
"uint16": "@stdlib/number/uint16/base/identity",
83+
"uint32": "@stdlib/number/uint32/base/identity",
84+
"float32": "@stdlib/math/base/special/absf",
85+
"float64": "@stdlib/math/base/special/abs",
86+
"generic": "@stdlib/math/base/special/abs"
87+
}
7188
}
7289
}
7390

lib/node_modules/@stdlib/math/special/scripts/scaffold_database.json

Lines changed: 163 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -285,5 +285,168 @@
285285
"dtype": "float64"
286286
}
287287
}
288+
},
289+
"@stdlib/math/base/special/labs": {
290+
"parameters": [
291+
{
292+
"type": {
293+
"dtype": "int32"
294+
}
295+
}
296+
],
297+
"returns": {
298+
"type": {
299+
"dtype": "int32"
300+
}
301+
}
302+
},
303+
"@stdlib/math/base/special/absf": {
304+
"$schema": "math/[email protected]",
305+
"base_alias": "abs",
306+
"alias": "absf",
307+
"pkg_desc": "compute the absolute value of a single-precision floating-point number",
308+
"desc": "computes the absolute value of a single-precision floating-point number",
309+
"short_desc": "absolute value",
310+
"parameters": [
311+
{
312+
"name": "x",
313+
"desc": "input value",
314+
"type": {
315+
"javascript": "number",
316+
"jsdoc": "number",
317+
"c": "float",
318+
"dtype": "float32"
319+
},
320+
"domain": [
321+
{
322+
"min": "-infinity",
323+
"max": "infinity"
324+
}
325+
],
326+
"rand": {
327+
"prng": "random/base/uniform",
328+
"parameters": [
329+
-10,
330+
10
331+
]
332+
},
333+
"example_values": [
334+
64,
335+
27,
336+
0,
337+
0.1,
338+
-9,
339+
8,
340+
-1,
341+
125,
342+
-10.2,
343+
11.3,
344+
-12.4,
345+
3.5,
346+
-1.6,
347+
15.7,
348+
-16,
349+
17.9,
350+
-188,
351+
19.11,
352+
-200,
353+
21.15
354+
]
355+
}
356+
],
357+
"output_policy": "same",
358+
"returns": {
359+
"desc": "absolute value",
360+
"type": {
361+
"javascript": "number",
362+
"jsdoc": "number",
363+
"c": "float",
364+
"dtype": "float32"
365+
}
366+
},
367+
"keywords": [
368+
"abs",
369+
"absf",
370+
"fabsf",
371+
"absolute",
372+
"magnitude",
373+
"value"
374+
],
375+
"extra_keywords": [
376+
"math.abs"
377+
]
378+
},
379+
"@stdlib/math/base/special/abs": {
380+
"$schema": "math/[email protected]",
381+
"base_alias": "abs",
382+
"alias": "abs",
383+
"pkg_desc": "compute the absolute value",
384+
"desc": "computes the absolute value",
385+
"short_desc": "absolute value",
386+
"parameters": [
387+
{
388+
"name": "x",
389+
"desc": "input value",
390+
"type": {
391+
"javascript": "number",
392+
"jsdoc": "number",
393+
"c": "double",
394+
"dtype": "float64"
395+
},
396+
"domain": [
397+
{
398+
"min": "-infinity",
399+
"max": "infinity"
400+
}
401+
],
402+
"rand": {
403+
"prng": "random/base/uniform",
404+
"parameters": [
405+
-10,
406+
10
407+
]
408+
},
409+
"example_values": [
410+
64,
411+
27,
412+
0,
413+
0.1,
414+
-9,
415+
8,
416+
-1,
417+
125,
418+
-10.2,
419+
11.3,
420+
-12.4,
421+
3.5,
422+
-1.6,
423+
15.7,
424+
-16,
425+
17.9,
426+
-188,
427+
19.11,
428+
-200,
429+
21.15
430+
]
431+
}
432+
],
433+
"output_policy": "same",
434+
"returns": {
435+
"desc": "absolute value",
436+
"type": {
437+
"javascript": "number",
438+
"jsdoc": "number",
439+
"c": "double",
440+
"dtype": "float64"
441+
}
442+
},
443+
"keywords": [
444+
"abs",
445+
"absolute",
446+
"magnitude"
447+
],
448+
"extra_keywords": [
449+
"math.abs"
450+
]
288451
}
289452
}

0 commit comments

Comments
 (0)