Gathering detailed insights and metrics for @stdlib/ndarray-dtypes
Gathering detailed insights and metrics for @stdlib/ndarray-dtypes
Gathering detailed insights and metrics for @stdlib/ndarray-dtypes
Gathering detailed insights and metrics for @stdlib/ndarray-dtypes
npm install @stdlib/ndarray-dtypes
Module System
Min. Node Version
Typescript Support
Node Version
NPM Version
2 Stars
69 Commits
3 Watching
5 Branches
10 Contributors
Updated on 01 Nov 2024
JavaScript (73.49%)
C (26.51%)
Cumulative downloads
Total Downloads
Last day
0.3%
660
Compared to previous day
Last week
7.9%
4,482
Compared to previous week
Last month
0.7%
21,967
Compared to previous month
Last year
17%
224,129
Compared to previous year
We believe in a future in which the web is a preferred environment for numerical computation. To help realize this future, we've built stdlib. stdlib is a standard library, with an emphasis on numerical and scientific computation, written in JavaScript (and C) for execution in browsers and in Node.js.
The library is fully decomposable, being architected in such a way that you can swap out and mix and match APIs and functionality to cater to your exact preferences and use cases.
When you use stdlib, you can be absolutely certain that you are using the most thorough, rigorous, well-written, studied, documented, tested, measured, and high-quality code out there.
To join us in bringing numerical computing to the web, get started by checking us out on GitHub, and please consider financially supporting stdlib. We greatly appreciate your continued support!
List of ndarray data types.
1npm install @stdlib/ndarray-dtypes
Alternatively,
script
tag without installation and bundlers, use the ES Module available on the esm
branch (see README).deno
branch (see README for usage intructions).umd
branch (see README).The branches.md file summarizes the available branches and displays a diagram illustrating their relationships.
To view installation and usage instructions specific to each branch build, be sure to explicitly navigate to the respective README files on each branch, as linked to above.
1var dtypes = require( '@stdlib/ndarray-dtypes' );
Returns a list of ndarray data types.
1var out = dtypes(); 2// e.g., returns [ 'binary', 'complex64', 'complex128', ... ]
When not provided a data type "kind", the function returns an array containing the following data types:
binary
: binary.bool
: boolean values.complex64
: single-precision complex floating-point numbers.complex128
: double-precision complex floating-point numbers.float32
: single-precision floating-point numbers.float64
: double-precision floating-point numbers.generic
: values of any type.int16
: signed 16-bit integers.int32
: signed 32-bit integers.int8
: signed 8-bit integers.uint16
: unsigned 16-bit integers.uint32
: unsigned 32-bit integers.uint8
: unsigned 8-bit integers.uint8c
: unsigned clamped 8-bit integers.To return the subset of data types belonging to a specified data type kind, provide a kind
argument.
1var out = dtypes( 'floating_point' ); 2// returns [...]
The function supports the following data type kinds:
floating_point
: floating-point data types.real_floating_point
: real-valued floating-point data types.complex_floating_point
: complex-valued floating-point data types.boolean
: boolean data types.integer
: integer data types.signed_integer
: signed integer data types.unsigned_integer
: unsigned integer data types.real
: real-valued data types.numeric
: numeric data types.typed
: typed data types.all
: all data types.Additionally, the function supports extending the "kinds" listed above by appending an _and_generic
suffix to the kind name (e.g., real_and_generic
).
1var out = dtypes( 'floating_point_and_generic' ); 2// returns [...]
1var contains = require( '@stdlib/array-base-assert-contains' ).factory; 2var dtypes = require( '@stdlib/ndarray-dtypes' ); 3 4var isdtype = contains( dtypes() ); 5 6var bool = isdtype( 'float64' ); 7// returns true 8 9bool = isdtype( 'int16' ); 10// returns true 11 12bool = isdtype( 'uint8' ); 13// returns true 14 15bool = isdtype( 'beep' ); 16// returns false
@stdlib/array-dtypes
: list of array data types.@stdlib/ndarray-array
: multidimensional arrays.@stdlib/ndarray-ctor
: multidimensional array constructor.@stdlib/array-typed-dtypes
: list of typed array data types.This package is part of stdlib, a standard library for JavaScript and Node.js, with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more.
For more information on the project, filing bug reports and feature requests, and guidance on how to develop stdlib, see the main project repository.
See LICENSE.
Copyright © 2016-2024. The Stdlib Authors.
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
no dangerous workflow patterns detected
Reason
0 existing vulnerabilities detected
Reason
license file detected
Details
Reason
security policy file detected
Details
Reason
dependency not pinned by hash detected -- score normalized to 3
Details
Reason
3 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 2
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
Found 0/30 approved changesets -- score normalized to 0
Reason
no SAST tool detected
Details
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Score
Last Scanned on 2024-11-18
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More