1.0.0 • Published 11 years ago
ndarray-translate v1.0.0
ndarray-translate
Shifts an ndarray by some integer shift.
Example
var lena = require("luminance")(require("lena"))
var translate = require("ndarray-translate")
translate(lena, [100, 180])
require("save-pixels")(lena, "png").pipe(process.stdout)This generates the following image:
Install
npm install ndarray-translaterequire("ndarray-translate")(array, shift)
Translates array by shift amount in place.
arrayis an ndarrayshiftis a vector with length equal to the dimension of the array representing the amount to shfit by. Coordinates for the shift get rounded to nearest integer.
Returns array
Credits
(c) 2013 Mikola Lysenko. MIT License