ndarray-base-unary-reduce-subarray-by

This repository contains a JavaScript library for performing unary reduction operations on subarrays within ndarray structures. Explore the code and contribute to enhance numerical computations! 🐙🌐

https://github.com/qrishna-qrishna/ndarray-base-unary-reduce-subarray-by

Science Score: 44.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (18.1%) to scientific vocabulary

Keywords

accumulate accumulation array base javascript ndarray nodejs reduce reduction stdlib strided subarray unary
Last synced: 4 months ago · JSON representation ·

Repository

This repository contains a JavaScript library for performing unary reduction operations on subarrays within ndarray structures. Explore the code and contribute to enhance numerical computations! 🐙🌐

Basic Info
  • Host: GitHub
  • Owner: qrishna-qrishna
  • License: apache-2.0
  • Language: JavaScript
  • Default Branch: main
  • Size: 137 KB
Statistics
  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • Open Issues: 0
  • Releases: 0
Topics
accumulate accumulation array base javascript ndarray nodejs reduce reduction stdlib strided subarray unary
Created 7 months ago · Last pushed 4 months ago
Metadata Files
Readme Changelog Contributing License Code of conduct Citation Security

README.md

ndarray-base-unary-reduce-subarray-by

GitHub Release Node.js JavaScript

Overview

The ndarray-base-unary-reduce-subarray-by repository provides a powerful tool for performing reductions on multi-dimensional arrays (ndarrays) in JavaScript. This library allows you to reduce a specified list of dimensions in an input ndarray using a callback function, with the results assigned to a designated output ndarray.

Features

  • Flexible Reductions: Choose dimensions for reduction and specify your callback function.
  • Efficient Performance: Built for speed, this library optimizes memory and processing.
  • Compatibility: Works seamlessly with Node.js and modern JavaScript environments.
  • Easy Integration: Simple API that integrates well with existing projects.

Installation

To get started, you can install the package via npm. Open your terminal and run:

bash npm install ndarray-base-unary-reduce-subarray-by

Usage

Here's a quick example of how to use the library:

```javascript const ndarray = require('ndarray'); const reduce = require('ndarray-base-unary-reduce-subarray-by');

// Create an ndarray const input = ndarray(new Float32Array([1, 2, 3, 4, 5, 6]), [2, 3]);

// Prepare an output ndarray const output = ndarray(new Float32Array(2), [2]);

// Define a callback function for reduction const callback = (accumulator, value) => accumulator + value;

// Perform the reduction reduce(input, output, callback, [1]);

console.log(output); // Outputs the reduced values ```

Parameters

  • input: The input ndarray you want to reduce.
  • output: The ndarray where results will be stored.
  • callback: A function that defines how to combine values.
  • dimensions: An array of dimensions to reduce.

Topics

This repository touches on several important topics in array manipulation and functional programming:

  • Accumulate: Build up results over specified dimensions.
  • Accumulation: Gather values into a single result.
  • Array: Work with multi-dimensional data structures.
  • Base: Core functionality for ndarray operations.
  • JavaScript: Built for the JavaScript ecosystem.
  • Node.js: Optimized for server-side applications.
  • Reduce: Functional programming technique for combining values.
  • Reduction: The process of simplifying data.
  • Stdlib: Utilizes standard libraries for efficiency.
  • Strided: Handles data with non-contiguous memory layouts.
  • Subarray: Work with slices of larger arrays.
  • Unary: Focuses on single-argument functions.

Contributing

We welcome contributions! If you'd like to help improve this library, please follow these steps:

  1. Fork the repository.
  2. Create a new branch for your feature or bug fix.
  3. Make your changes.
  4. Write tests for your changes.
  5. Submit a pull request.

Please ensure that your code adheres to the existing style and includes appropriate documentation.

Testing

To run the tests, you can use the following command:

bash npm test

Ensure that all tests pass before submitting your contributions.

License

This project is licensed under the MIT License. See the LICENSE file for details.

Releases

You can find the latest releases and updates on our Releases page. Make sure to download and execute the appropriate files for your setup.

Acknowledgments

This project builds on the work of many contributors in the ndarray ecosystem. Special thanks to the maintainers of the libraries that support this project.

Contact

For any questions or feedback, please reach out via GitHub issues or contact me directly at your-email@example.com.

Conclusion

The ndarray-base-unary-reduce-subarray-by library offers a robust solution for reducing ndarrays in JavaScript. With its simple API and efficient performance, it is an essential tool for developers working with multi-dimensional data. Explore the features, integrate it into your projects, and enjoy the benefits of efficient array manipulations.

For more details, visit our Releases page.

Owner

  • Login: qrishna-qrishna
  • Kind: user

Citation (CITATION.cff)

cff-version: 1.2.0
title: stdlib
message: >-
  If you use this software, please cite it using the
  metadata from this file.

type: software

authors:
  - name: The Stdlib Authors
    url: https://github.com/stdlib-js/stdlib/graphs/contributors

repository-code: https://github.com/stdlib-js/stdlib
url: https://stdlib.io

abstract: |
  Standard library for JavaScript and Node.js.

keywords:
  - JavaScript
  - Node.js
  - TypeScript
  - standard library
  - scientific computing
  - numerical computing
  - statistical computing

license: Apache-2.0 AND BSL-1.0

date-released: 2016

GitHub Events

Total
  • Push event: 396
  • Create event: 2
Last Year
  • Push event: 396
  • Create event: 2

Dependencies

package.json npm
  • @stdlib/array-base-filled ^0.2.2 development
  • @stdlib/ndarray-base-every-by github:stdlib-js/ndarray-base-every-by#main development
  • @stdlib/ndarray-base-to-array ^0.2.1 development
  • @stdlib/random-array-discrete-uniform ^0.2.1 development
  • istanbul ^0.4.1 development
  • tap-min git+https://github.com/Planeshifter/tap-min.git development
  • tape git+https://github.com/kgryte/tape.git#fix/globby development
  • @stdlib/array-base-indices-complement github:stdlib-js/array-base-indices-complement#main
  • @stdlib/array-base-join ^0.1.1
  • @stdlib/array-base-put ^0.0.2
  • @stdlib/array-base-reverse ^0.2.2
  • @stdlib/array-base-take-indexed ^0.2.2
  • @stdlib/array-base-take-indexed2 github:stdlib-js/array-base-take-indexed2#main
  • @stdlib/array-base-without github:stdlib-js/array-base-without#main
  • @stdlib/array-base-zero-to ^0.2.1
  • @stdlib/array-base-zeros ^0.2.2
  • @stdlib/assert-is-function ^0.2.2
  • @stdlib/error-tools-fmtprodmsg ^0.2.2
  • @stdlib/ndarray-base-ind2sub ^0.2.2
  • @stdlib/ndarray-base-iteration-order ^0.2.2
  • @stdlib/ndarray-base-ndarraylike2object ^0.2.2
  • @stdlib/ndarray-base-numel ^0.2.2
  • @stdlib/ndarray-base-strides2order ^0.2.2
  • @stdlib/ndarray-base-to-unique-normalized-indices github:stdlib-js/ndarray-base-to-unique-normalized-indices#main
  • @stdlib/ndarray-base-unary-loop-interchange-order ^0.2.1
  • @stdlib/ndarray-base-unary-tiling-block-size ^0.2.2
  • @stdlib/ndarray-base-vind2bind ^0.2.2
  • @stdlib/string-format ^0.2.2
  • @stdlib/types ^0.4.3
  • @stdlib/utils-define-nonenumerable-read-only-property ^0.2.2