Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@stdlib/array-float32

Package Overview
Dependencies
Maintainers
4
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@stdlib/array-float32

Float32Array.

  • 0.2.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
79K
decreased by-80.73%
Maintainers
4
Weekly downloads
 
Created

What is @stdlib/array-float32?

@stdlib/array-float32 is a package that provides utilities for creating and manipulating Float32 arrays. It is part of the larger @stdlib library, which is a collection of standard libraries for JavaScript and Node.js.

What are @stdlib/array-float32's main functionalities?

Creating a Float32Array

This feature allows you to create a new Float32Array from an array of numbers.

const Float32Array = require('@stdlib/array-float32');
const arr = new Float32Array([1.0, 2.0, 3.0, 4.0]);
console.log(arr);

Accessing elements

This feature allows you to access elements in the Float32Array using index notation.

const Float32Array = require('@stdlib/array-float32');
const arr = new Float32Array([1.0, 2.0, 3.0, 4.0]);
console.log(arr[0]); // 1.0
console.log(arr[1]); // 2.0

Setting elements

This feature allows you to set elements in the Float32Array using index notation.

const Float32Array = require('@stdlib/array-float32');
const arr = new Float32Array(4);
arr[0] = 1.0;
arr[1] = 2.0;
arr[2] = 3.0;
arr[3] = 4.0;
console.log(arr);

Typed array methods

This feature allows you to use various typed array methods such as subarray to manipulate the Float32Array.

const Float32Array = require('@stdlib/array-float32');
const arr = new Float32Array([1.0, 2.0, 3.0, 4.0]);
const subarray = arr.subarray(1, 3);
console.log(subarray); // Float32Array [ 2.0, 3.0 ]

Other packages similar to @stdlib/array-float32

Keywords

FAQs

Package last updated on 14 Feb 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc