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

ndarray-fill

Package Overview
Dependencies
Maintainers
6
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ndarray-fill

Fills an ndarray with function

  • 1.0.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
15K
increased by0.05%
Maintainers
6
Weekly downloads
 
Created
Source

ndarray-fill

Initialize an ndarray with a function.

Build Status

Example

var zeros = require("zeros")
var fill = require("ndarray-fill")

var x = zeros([5, 5])

fill(x, function(i,j) {
  return 10*i + j
})

//Now x = 
//
//   0  1  2  3  4
//  10 11 12 13 14
//  20 21 22 23 24
//  30 31 32 33 34
//

Install

npm install ndarray-fill

require("ndarray-fill")(array, func)

Fills an ndarray with a pattern

  • array is an ndarray which will be initialized
  • func is a function that will be used to initialize the array

Returns An initialized ndarray

Credits

(c) 2013 Mikola Lysenko. MIT License

Keywords

FAQs

Package last updated on 14 Mar 2017

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