Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/stdlib-js/strided-base
Base strided.
https://github.com/stdlib-js/strided-base
array base element-wise elementwise javascript lib library ndarray node node-js nodejs standard stdlib strided vector
Last synced: 2 months ago
JSON representation
Base strided.
- Host: GitHub
- URL: https://github.com/stdlib-js/strided-base
- Owner: stdlib-js
- License: apache-2.0
- Created: 2021-06-14T13:17:43.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2024-11-20T03:42:22.000Z (2 months ago)
- Last Synced: 2024-11-20T04:26:12.789Z (2 months ago)
- Topics: array, base, element-wise, elementwise, javascript, lib, library, ndarray, node, node-js, nodejs, standard, stdlib, strided, vector
- Language: JavaScript
- Homepage: https://github.com/stdlib-js/stdlib
- Size: 6.16 MB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
- Citation: CITATION.cff
- Security: SECURITY.md
Awesome Lists containing this project
README
About stdlib...
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!
# Base
[![NPM version][npm-image]][npm-url] [![Build Status][test-image]][test-url] [![Coverage Status][coverage-image]][coverage-url]
> Base strided.
## Installation
```bash
npm install @stdlib/strided-base
```Alternatively,
- To load the package in a website via a `script` tag without installation and bundlers, use the [ES Module][es-module] available on the [`esm`][esm-url] branch (see [README][esm-readme]).
- If you are using Deno, visit the [`deno`][deno-url] branch (see [README][deno-readme] for usage intructions).
- For use in Observable, or in browser/node environments, use the [Universal Module Definition (UMD)][umd] build available on the [`umd`][umd-url] branch (see [README][umd-readme]).The [branches.md][branches-url] 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.
## Usage
```javascript
var ns = require( '@stdlib/strided-base' );
```#### ns
Base strided.
```javascript
var o = ns;
// returns {...}
```The following functions are currently exported:
- [`binaryAddonDispatch( addon, fallback )`][@stdlib/strided/base/binary-addon-dispatch]: dispatch to a native add-on applying a binary function to two input strided arrays.
- [`binaryDtypeSignatures( dtypes1, dtypes2, dtypes3[, options] )`][@stdlib/strided/base/binary-dtype-signatures]: generate a list of binary interface signatures from strided array data types.
- [`binarySignatureCallbacks( table, signatures )`][@stdlib/strided/base/binary-signature-callbacks]: assign callbacks to binary interfaces according to type promotion rules.
- [`binary( arrays, shape, strides, fcn )`][@stdlib/strided/base/binary]: apply a binary callback to strided input array elements and assign results to elements in a strided output array.
- [`cmap( N, x, strideX, y, strideY, fcn )`][@stdlib/strided/base/cmap]: apply a unary function to a single-precision floating-point strided input array and assign results to a single-precision floating-point strided output array.
- [`dmap( N, x, strideX, y, strideY, fcn )`][@stdlib/strided/base/dmap]: apply a unary function to a double-precision floating-point strided input array and assign results to a double-precision floating-point strided output array.
- [`dmap2( N, x, strideX, y, strideY, z, strideZ, fcn )`][@stdlib/strided/base/dmap2]: apply a binary function to double-precision floating-point strided input arrays and assign results to a double-precision floating-point strided output array.
- [`dmskmap( N, x, strideX, mask, strideMask, y, strideY, fcn )`][@stdlib/strided/base/dmskmap]: apply a unary function to a double-precision floating-point strided input array according to a strided mask array and assign results to a double-precision floating-point strided output array.
- [`dmskmap2( N, x, strideX, y, strideY, mask, strideMask, z, strideZ, fcn )`][@stdlib/strided/base/dmskmap2]: apply a binary function to double-precision floating-point strided input arrays according to a strided mask array and assign results to a double-precision floating-point strided output array.
- [`dtypeEnum2Str( dtype )`][@stdlib/strided/base/dtype-enum2str]: return the data type string associated with a strided array data type enumeration constant.
- [`dtypeResolveEnum( dtype )`][@stdlib/strided/base/dtype-resolve-enum]: return the enumeration constant associated with a supported strided array data type value.
- [`dtypeResolveStr( dtype )`][@stdlib/strided/base/dtype-resolve-str]: return the data type string associated with a supported strided array data type value.
- [`dtypeStr2Enum( dtype )`][@stdlib/strided/base/dtype-str2enum]: return the enumeration constant associated with a strided array data type string.
- [`mapBy( N, x, strideX, y, strideY, fcn, clbk[, thisArg] )`][@stdlib/strided/base/map-by]: apply a unary function to each element retrieved from a strided input array according to a callback function and assign results to a strided output array.
- [`mapBy2( N, x, strideX, y, strideY, z, strideZ, fcn, clbk[, thisArg] )`][@stdlib/strided/base/map-by2]: apply a binary function to each pair of elements retrieved from strided input arrays according to a callback function and assign results to a strided output array.
- [`maxViewBufferIndex( N, stride, offset )`][@stdlib/strided/base/max-view-buffer-index]: return the maximum accessible index based on a set of provided strided array parameters.
- [`metaDataProps( meta, dtypes, obj, bool )`][@stdlib/strided/base/meta-data-props]: define non-enumerable read-only properties which expose strided array function meta data.
- [`minViewBufferIndex( N, stride, offset )`][@stdlib/strided/base/min-view-buffer-index]: return the minimum accessible index based on a set of provided strided array parameters.
- [`mskunaryAddonDispatch( addon, fallback )`][@stdlib/strided/base/mskunary-addon-dispatch]: dispatch to a native add-on applying a unary function to an input strided array according to a mask strided array.
- [`mskunaryDtypeSignatures( dtypes1, dtypes2[, options] )`][@stdlib/strided/base/mskunary-dtype-signatures]: generate a list of masked unary interface signatures from strided array data types.
- [`mskunarySignatureCallbacks( table, signatures )`][@stdlib/strided/base/mskunary-signature-callbacks]: assign callbacks to masked unary interfaces according to type promotion rules.
- [`mskunary( arrays, shape, strides, fcn )`][@stdlib/strided/base/mskunary]: apply a unary callback to elements in a strided input array according to elements in a strided mask array and assign results to elements in a strided output array.
- [`nullaryAddonDispatch( addon, fallback )`][@stdlib/strided/base/nullary-addon-dispatch]: dispatch to a native add-on applying a nullary function.
- [`nullary( arrays, shape, strides, fcn )`][@stdlib/strided/base/nullary]: apply a nullary callback and assign results to elements in a strided output array.
- [`offsetView( x, offset )`][@stdlib/strided/base/offset-view]: return a typed array view having the same data type as a provided input typed array and starting at a specified index offset.
- [`quaternary( arrays, shape, strides, fcn )`][@stdlib/strided/base/quaternary]: apply a quaternary callback to strided input array elements and assign results to elements in a strided output array.
- [`quinary( arrays, shape, strides, fcn )`][@stdlib/strided/base/quinary]: apply a quinary callback to strided input array elements and assign results to elements in a strided output array.
- [`reinterpretBoolean( x, offset )`][@stdlib/strided/base/reinterpret-boolean]: reinterpret a `BooleanArray` as a `Uint8Array`.
- [`reinterpretComplex( x, offset )`][@stdlib/strided/base/reinterpret-complex]: reinterpret a complex-valued floating-point array as a real-valued floating-point array having the same precision.
- [`reinterpretComplex128( x, offset )`][@stdlib/strided/base/reinterpret-complex128]: reinterpret a `Complex128Array` as a `Float64Array`.
- [`reinterpretComplex64( x, offset )`][@stdlib/strided/base/reinterpret-complex64]: reinterpret a `Complex64Array` as a `Float32Array`.
- [`smap( N, x, strideX, y, strideY, fcn )`][@stdlib/strided/base/smap]: apply a unary function to a single-precision floating-point strided input array and assign results to a single-precision floating-point strided output array.
- [`smap2( N, x, strideX, y, strideY, z, strideZ, fcn )`][@stdlib/strided/base/smap2]: apply a binary function to single-precision floating-point strided input arrays and assign results to a single-precision floating-point strided output array.
- [`smskmap( N, x, strideX, mask, strideMask, y, strideY, fcn )`][@stdlib/strided/base/smskmap]: apply a unary function to a single-precision floating-point strided input array according to a strided mask array and assign results to a single-precision floating-point strided output array.
- [`smskmap2( N, x, strideX, y, strideY, mask, strideMask, z, strideZ, fcn )`][@stdlib/strided/base/smskmap2]: apply a binary function to single-precision floating-point strided input arrays according to a strided mask array and assign results to a single-precision floating-point strided output array.
- [`stride2offset( N, stride )`][@stdlib/strided/base/stride2offset]: determine the index offset which specifies the location of the first indexed value in a strided array.
- [`ternary( arrays, shape, strides, fcn )`][@stdlib/strided/base/ternary]: apply a ternary callback to strided input array elements and assign results to elements in a strided output array.
- [`unaryAddonDispatch( addon, fallback )`][@stdlib/strided/base/unary-addon-dispatch]: dispatch to a native add-on applying a unary function to an input strided array.
- [`unaryBy( arrays, shape, strides, fcn, clbk[, thisArg] )`][@stdlib/strided/base/unary-by]: apply a unary function to each element retrieved from a strided input array according to a callback function and assign results to a strided output array.
- [`unaryDtypeSignatures( dtypes1, dtypes2[, options] )`][@stdlib/strided/base/unary-dtype-signatures]: generate a list of unary interface signatures from strided array data types.
- [`unarySignatureCallbacks( table, signatures )`][@stdlib/strided/base/unary-signature-callbacks]: assign callbacks to unary interfaces according to type promotion rules.
- [`unary( arrays, shape, strides, fcn )`][@stdlib/strided/base/unary]: apply a unary callback to elements in a strided input array and assign results to elements in a strided output array.
- [`zmap( N, x, strideX, y, strideY, fcn )`][@stdlib/strided/base/zmap]: apply a unary function to a double-precision floating-point strided input array and assign results to a double-precision floating-point strided output array.## Examples
```javascript
var objectKeys = require( '@stdlib/utils-keys' );
var ns = require( '@stdlib/strided-base' );console.log( objectKeys( ns ) );
```* * *
## Notice
This package is part of [stdlib][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][stdlib], see the main project [repository][stdlib].
#### Community
[![Chat][chat-image]][chat-url]
---
## License
See [LICENSE][stdlib-license].
## Copyright
Copyright © 2016-2024. The Stdlib [Authors][stdlib-authors].
[npm-image]: http://img.shields.io/npm/v/@stdlib/strided-base.svg
[npm-url]: https://npmjs.org/package/@stdlib/strided-base[test-image]: https://github.com/stdlib-js/strided-base/actions/workflows/test.yml/badge.svg?branch=main
[test-url]: https://github.com/stdlib-js/strided-base/actions/workflows/test.yml?query=branch:main[coverage-image]: https://img.shields.io/codecov/c/github/stdlib-js/strided-base/main.svg
[coverage-url]: https://codecov.io/github/stdlib-js/strided-base?branch=main[chat-image]: https://img.shields.io/gitter/room/stdlib-js/stdlib.svg
[chat-url]: https://app.gitter.im/#/room/#stdlib-js_stdlib:gitter.im[stdlib]: https://github.com/stdlib-js/stdlib
[stdlib-authors]: https://github.com/stdlib-js/stdlib/graphs/contributors
[umd]: https://github.com/umdjs/umd
[es-module]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Modules[deno-url]: https://github.com/stdlib-js/strided-base/tree/deno
[deno-readme]: https://github.com/stdlib-js/strided-base/blob/deno/README.md
[umd-url]: https://github.com/stdlib-js/strided-base/tree/umd
[umd-readme]: https://github.com/stdlib-js/strided-base/blob/umd/README.md
[esm-url]: https://github.com/stdlib-js/strided-base/tree/esm
[esm-readme]: https://github.com/stdlib-js/strided-base/blob/esm/README.md
[branches-url]: https://github.com/stdlib-js/strided-base/blob/main/branches.md[stdlib-license]: https://raw.githubusercontent.com/stdlib-js/strided-base/main/LICENSE
[@stdlib/strided/base/binary-addon-dispatch]: https://github.com/stdlib-js/strided-base-binary-addon-dispatch
[@stdlib/strided/base/binary-dtype-signatures]: https://github.com/stdlib-js/strided-base-binary-dtype-signatures
[@stdlib/strided/base/binary-signature-callbacks]: https://github.com/stdlib-js/strided-base-binary-signature-callbacks
[@stdlib/strided/base/binary]: https://github.com/stdlib-js/strided-base-binary
[@stdlib/strided/base/cmap]: https://github.com/stdlib-js/strided-base-cmap
[@stdlib/strided/base/dmap]: https://github.com/stdlib-js/strided-base-dmap
[@stdlib/strided/base/dmap2]: https://github.com/stdlib-js/strided-base-dmap2
[@stdlib/strided/base/dmskmap]: https://github.com/stdlib-js/strided-base-dmskmap
[@stdlib/strided/base/dmskmap2]: https://github.com/stdlib-js/strided-base-dmskmap2
[@stdlib/strided/base/dtype-enum2str]: https://github.com/stdlib-js/strided-base-dtype-enum2str
[@stdlib/strided/base/dtype-resolve-enum]: https://github.com/stdlib-js/strided-base-dtype-resolve-enum
[@stdlib/strided/base/dtype-resolve-str]: https://github.com/stdlib-js/strided-base-dtype-resolve-str
[@stdlib/strided/base/dtype-str2enum]: https://github.com/stdlib-js/strided-base-dtype-str2enum
[@stdlib/strided/base/map-by]: https://github.com/stdlib-js/strided-base-map-by
[@stdlib/strided/base/map-by2]: https://github.com/stdlib-js/strided-base-map-by2
[@stdlib/strided/base/max-view-buffer-index]: https://github.com/stdlib-js/strided-base-max-view-buffer-index
[@stdlib/strided/base/meta-data-props]: https://github.com/stdlib-js/strided-base-meta-data-props
[@stdlib/strided/base/min-view-buffer-index]: https://github.com/stdlib-js/strided-base-min-view-buffer-index
[@stdlib/strided/base/mskunary-addon-dispatch]: https://github.com/stdlib-js/strided-base-mskunary-addon-dispatch
[@stdlib/strided/base/mskunary-dtype-signatures]: https://github.com/stdlib-js/strided-base-mskunary-dtype-signatures
[@stdlib/strided/base/mskunary-signature-callbacks]: https://github.com/stdlib-js/strided-base-mskunary-signature-callbacks
[@stdlib/strided/base/mskunary]: https://github.com/stdlib-js/strided-base-mskunary
[@stdlib/strided/base/nullary-addon-dispatch]: https://github.com/stdlib-js/strided-base-nullary-addon-dispatch
[@stdlib/strided/base/nullary]: https://github.com/stdlib-js/strided-base-nullary
[@stdlib/strided/base/offset-view]: https://github.com/stdlib-js/strided-base-offset-view
[@stdlib/strided/base/quaternary]: https://github.com/stdlib-js/strided-base-quaternary
[@stdlib/strided/base/quinary]: https://github.com/stdlib-js/strided-base-quinary
[@stdlib/strided/base/reinterpret-boolean]: https://github.com/stdlib-js/strided-base-reinterpret-boolean
[@stdlib/strided/base/reinterpret-complex]: https://github.com/stdlib-js/strided-base-reinterpret-complex
[@stdlib/strided/base/reinterpret-complex128]: https://github.com/stdlib-js/strided-base-reinterpret-complex128
[@stdlib/strided/base/reinterpret-complex64]: https://github.com/stdlib-js/strided-base-reinterpret-complex64
[@stdlib/strided/base/smap]: https://github.com/stdlib-js/strided-base-smap
[@stdlib/strided/base/smap2]: https://github.com/stdlib-js/strided-base-smap2
[@stdlib/strided/base/smskmap]: https://github.com/stdlib-js/strided-base-smskmap
[@stdlib/strided/base/smskmap2]: https://github.com/stdlib-js/strided-base-smskmap2
[@stdlib/strided/base/stride2offset]: https://github.com/stdlib-js/strided-base-stride2offset
[@stdlib/strided/base/ternary]: https://github.com/stdlib-js/strided-base-ternary
[@stdlib/strided/base/unary-addon-dispatch]: https://github.com/stdlib-js/strided-base-unary-addon-dispatch
[@stdlib/strided/base/unary-by]: https://github.com/stdlib-js/strided-base-unary-by
[@stdlib/strided/base/unary-dtype-signatures]: https://github.com/stdlib-js/strided-base-unary-dtype-signatures
[@stdlib/strided/base/unary-signature-callbacks]: https://github.com/stdlib-js/strided-base-unary-signature-callbacks
[@stdlib/strided/base/unary]: https://github.com/stdlib-js/strided-base-unary
[@stdlib/strided/base/zmap]: https://github.com/stdlib-js/strided-base-zmap