Skip to content

Latest commit

History

14 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

ndarray-fill

Initialize an ndarray with a function.

Build Status

Example

varzeros=require("zeros")varfill=require("ndarray-fill")varx=zeros([5,5])fill(x,function(i,j){return10*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

About

Fills an ndarray with a function

Resources

Stars

20 stars

Watchers

3 watching

Forks

Releases

Packages

Used by

Contributors

Languages