ndarray-vector-int8
Create a signed 8-bit integer vector (i.e., a one-dimensional ndarray).
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 (14.4%) to scientific vocabulary
Keywords
Repository
Create a signed 8-bit integer vector (i.e., a one-dimensional ndarray).
Basic Info
- Host: GitHub
- Owner: Alexey-ai-wq
- License: apache-2.0
- Language: JavaScript
- Default Branch: main
- Size: 49.8 KB
Statistics
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
- Releases: 0
Topics
Metadata Files
README.md
ndarray-vector-int8 🧮
Welcome to the ndarray-vector-int8 repository! This project allows you to create a signed 8-bit integer vector, which is a one-dimensional ndarray.
Table of Contents
Introduction
The ndarray-vector-int8 library is designed for developers who need a simple way to work with signed 8-bit integer vectors in JavaScript. This library provides an efficient way to handle numerical data in applications such as data analysis, machine learning, and more.
Installation
To get started with ndarray-vector-int8, you need to install it via npm. Run the following command in your terminal:
bash
npm install ndarray-vector-int8
Once installed, you can begin using the library in your project.
Usage
After installing the library, you can create a signed 8-bit integer vector. Here’s a basic example of how to do this:
```javascript const Int8Vector = require('ndarray-vector-int8');
// Create a new vector const vector = new Int8Vector([1, -2, 3, -4, 5]);
console.log(vector); // Output: Int8Vector [1, -2, 3, -4, 5] ```
API Reference
Constructor
The main constructor for creating a signed 8-bit integer vector is Int8Vector. You can initialize it with an array of numbers.
Syntax
javascript
new Int8Vector(data)
- data: An array of numbers to initialize the vector.
Methods
- get(index): Returns the value at the specified index.
- set(index, value): Sets the value at the specified index.
- length(): Returns the length of the vector.
Example
```javascript const vector = new Int8Vector([1, -2, 3]);
console.log(vector.get(0)); // Output: 1 vector.set(1, 4); console.log(vector.get(1)); // Output: 4 console.log(vector.length()); // Output: 3 ```
Examples
Here are a few examples demonstrating the functionality of the ndarray-vector-int8 library:
Example 1: Creating a Vector
```javascript const Int8Vector = require('ndarray-vector-int8');
const vector = new Int8Vector([-5, 10, 15]); console.log(vector); // Output: Int8Vector [-5, 10, 15] ```
Example 2: Accessing Elements
```javascript const vector = new Int8Vector([0, 1, 2, 3, 4]);
console.log(vector.get(2)); // Output: 2 ```
Example 3: Modifying Elements
```javascript const vector = new Int8Vector([5, 10, 15]);
vector.set(1, 20); console.log(vector.get(1)); // Output: 20 ```
Contributing
We welcome contributions to the ndarray-vector-int8 project. If you have ideas for improvements or new features, please feel free to fork the repository and submit a pull request.
Steps to Contribute
- Fork the repository.
- Create a new branch for your feature or fix.
- Make your changes.
- Commit your changes.
- Push to your branch.
- Submit a pull request.
License
This project is licensed under the MIT License. See the LICENSE file for details.
Releases
For the latest releases and updates, visit the Releases section.
Conclusion
The ndarray-vector-int8 library provides a straightforward and efficient way to work with signed 8-bit integer vectors in JavaScript. Whether you're building applications for data analysis or machine learning, this library can help you manage numerical data with ease.
Feel free to explore the code, try out the examples, and contribute to the project!
Owner
- Login: Alexey-ai-wq
- Kind: user
- Repositories: 1
- Profile: https://github.com/Alexey-ai-wq
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: 368
- Create event: 2
Last Year
- Push event: 368
- Create event: 2
Dependencies
- @stdlib/array-buffer ^0.2.2 development
- @stdlib/array-float64 ^0.2.2 development
- @stdlib/array-int8 ^0.2.2 development
- @stdlib/assert-is-equal-int8array github:stdlib-js/assert-is-equal-int8array#main development
- @stdlib/assert-is-ndarray-like ^0.2.2 development
- @stdlib/assert-is-ndarray-like-with-data-type github:stdlib-js/assert-is-ndarray-like-with-data-type#main development
- @stdlib/bench-harness ^0.2.2 development
- @stdlib/blas-ext-sum github:stdlib-js/blas-ext-sum#main development
- @stdlib/buffer-from-array ^0.2.2 development
- @stdlib/math-base-special-pow ^0.3.0 development
- @stdlib/ndarray-base-assert-is-read-only ^0.2.2 development
- @stdlib/ndarray-data-buffer ^0.2.2 development
- @stdlib/ndarray-map github:stdlib-js/ndarray-map#main 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/ndarray-vector-ctor github:stdlib-js/ndarray-vector-ctor#main
- @stdlib/types ^0.4.3