Welis Garagen-Anzeige
This commit is contained in:
+16
@@ -0,0 +1,16 @@
|
||||
lib-cov
|
||||
*.seed
|
||||
*.log
|
||||
*.csv
|
||||
*.dat
|
||||
*.out
|
||||
*.pid
|
||||
*.gz
|
||||
|
||||
pids
|
||||
logs
|
||||
results
|
||||
|
||||
npm-debug.log
|
||||
node_modules/*
|
||||
test/*
|
||||
+22
@@ -0,0 +1,22 @@
|
||||
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2013 Mikola Lysenko
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
+31
@@ -0,0 +1,31 @@
|
||||
ndarray-pack
|
||||
============
|
||||
Converts an array-of-arrays (ie [numeric.js array](http://www.numericjs.com/)) into a packed [ndarray](https://github.com/mikolalysenko/ndarray).
|
||||
|
||||
Example
|
||||
=======
|
||||
```javascript
|
||||
//First create a numeric.js style array:
|
||||
var x = [[1, 0, 1],
|
||||
[0, 1, 1],
|
||||
[0, 0, 1],
|
||||
[1, 0, 0]]
|
||||
|
||||
var y = require("ndarray-pack")(x)
|
||||
```
|
||||
|
||||
Install
|
||||
=======
|
||||
|
||||
npm install ndarray-pack
|
||||
|
||||
### `require("ndarray-pack")(nested_array[,out])`
|
||||
Converts the nested array into a packed ndarray.
|
||||
|
||||
* `nested_array` is an array-of-arrays (ie a numeric.js array)
|
||||
* `out` is an optional ndarray that gets the result of unpacking `array`
|
||||
|
||||
**Returns** A packed ndarray representation of the nested arrays.
|
||||
|
||||
# Credits
|
||||
(c) 2013 Mikola Lysenko. MIT License
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
"use strict"
|
||||
|
||||
var bake = require("cwise-bake")
|
||||
|
||||
console.log("module.exports=require('cwise-compiler')(" + JSON.stringify(
|
||||
bake({
|
||||
args: ["array", "scalar", "index"],
|
||||
body: function(o, a, x) {
|
||||
var v=a,i
|
||||
for(i=0;i<x.length-1;++i) {
|
||||
v=v[x[i]]
|
||||
}
|
||||
o=v[x[x.length-1]]
|
||||
},
|
||||
funcName: "convert"
|
||||
})) + ")")
|
||||
+21
@@ -0,0 +1,21 @@
|
||||
"use strict"
|
||||
|
||||
var ndarray = require("ndarray")
|
||||
var do_convert = require("./doConvert.js")
|
||||
|
||||
module.exports = function convert(arr, result) {
|
||||
var shape = [], c = arr, sz = 1
|
||||
while(Array.isArray(c)) {
|
||||
shape.push(c.length)
|
||||
sz *= c.length
|
||||
c = c[0]
|
||||
}
|
||||
if(shape.length === 0) {
|
||||
return ndarray()
|
||||
}
|
||||
if(!result) {
|
||||
result = ndarray(new Float64Array(sz), shape)
|
||||
}
|
||||
do_convert(result, arr)
|
||||
return result
|
||||
}
|
||||
+1
@@ -0,0 +1 @@
|
||||
module.exports=require('cwise-compiler')({"args":["array","scalar","index"],"pre":{"body":"{}","args":[],"thisVars":[],"localVars":[]},"body":{"body":"{\nvar _inline_1_v=_inline_1_arg1_,_inline_1_i\nfor(_inline_1_i=0;_inline_1_i<_inline_1_arg2_.length-1;++_inline_1_i) {\n_inline_1_v=_inline_1_v[_inline_1_arg2_[_inline_1_i]]\n}\n_inline_1_arg0_=_inline_1_v[_inline_1_arg2_[_inline_1_arg2_.length-1]]\n}","args":[{"name":"_inline_1_arg0_","lvalue":true,"rvalue":false,"count":1},{"name":"_inline_1_arg1_","lvalue":false,"rvalue":true,"count":1},{"name":"_inline_1_arg2_","lvalue":false,"rvalue":true,"count":4}],"thisVars":[],"localVars":["_inline_1_i","_inline_1_v"]},"post":{"body":"{}","args":[],"thisVars":[],"localVars":[]},"funcName":"convert","blockSize":64})
|
||||
+121
@@ -0,0 +1,121 @@
|
||||
{
|
||||
"_args": [
|
||||
[
|
||||
{
|
||||
"raw": "ndarray-pack@^1.1.1",
|
||||
"scope": null,
|
||||
"escapedName": "ndarray-pack",
|
||||
"name": "ndarray-pack",
|
||||
"rawSpec": "^1.1.1",
|
||||
"spec": ">=1.1.1 <2.0.0",
|
||||
"type": "range"
|
||||
},
|
||||
"/Users/gerrit/Documents/node.js-Projects/tinkerforge/node_modules/get-pixels"
|
||||
]
|
||||
],
|
||||
"_from": "ndarray-pack@>=1.1.1 <2.0.0",
|
||||
"_id": "ndarray-pack@1.2.1",
|
||||
"_inCache": true,
|
||||
"_location": "/ndarray-pack",
|
||||
"_nodeVersion": "0.12.2",
|
||||
"_npmOperationalInternal": {
|
||||
"host": "packages-12-west.internal.npmjs.com",
|
||||
"tmp": "tmp/ndarray-pack-1.2.1.tgz_1470154292360_0.06873388937674463"
|
||||
},
|
||||
"_npmUser": {
|
||||
"name": "mikolalysenko",
|
||||
"email": "mikolalysenko@gmail.com"
|
||||
},
|
||||
"_npmVersion": "2.13.1",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"raw": "ndarray-pack@^1.1.1",
|
||||
"scope": null,
|
||||
"escapedName": "ndarray-pack",
|
||||
"name": "ndarray-pack",
|
||||
"rawSpec": "^1.1.1",
|
||||
"spec": ">=1.1.1 <2.0.0",
|
||||
"type": "range"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/get-pixels"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/ndarray-pack/-/ndarray-pack-1.2.1.tgz",
|
||||
"_shasum": "8caebeaaa24d5ecf70ff86020637977da8ee585a",
|
||||
"_shrinkwrap": null,
|
||||
"_spec": "ndarray-pack@^1.1.1",
|
||||
"_where": "/Users/gerrit/Documents/node.js-Projects/tinkerforge/node_modules/get-pixels",
|
||||
"author": {
|
||||
"name": "Mikola Lysenko"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/mikolalysenko/ndarray-pack/issues"
|
||||
},
|
||||
"dependencies": {
|
||||
"cwise-compiler": "^1.1.2",
|
||||
"ndarray": "^1.0.13"
|
||||
},
|
||||
"description": "Packs an array-of-arrays into a single ndarray",
|
||||
"devDependencies": {
|
||||
"cwise-bake": "0.0.0",
|
||||
"tap": "~0.4.2"
|
||||
},
|
||||
"directories": {
|
||||
"test": "test"
|
||||
},
|
||||
"dist": {
|
||||
"shasum": "8caebeaaa24d5ecf70ff86020637977da8ee585a",
|
||||
"tarball": "https://registry.npmjs.org/ndarray-pack/-/ndarray-pack-1.2.1.tgz"
|
||||
},
|
||||
"gitHead": "b6a147c9031aefb453d32efad21e7055993e38ff",
|
||||
"homepage": "https://github.com/mikolalysenko/ndarray-pack#readme",
|
||||
"keywords": [
|
||||
"ndarray",
|
||||
"numeric",
|
||||
"array",
|
||||
"nested",
|
||||
"pack",
|
||||
"typedarray",
|
||||
"memory"
|
||||
],
|
||||
"license": "MIT",
|
||||
"main": "convert.js",
|
||||
"maintainers": [
|
||||
{
|
||||
"name": "mikolalysenko",
|
||||
"email": "mikolalysenko@gmail.com"
|
||||
},
|
||||
{
|
||||
"name": "rreusser",
|
||||
"email": "rsreusser@gmail.com"
|
||||
},
|
||||
{
|
||||
"name": "planeshifter",
|
||||
"email": "pgb@andrew.cmu.edu"
|
||||
},
|
||||
{
|
||||
"name": "jaspervdg",
|
||||
"email": "th.v.d.gronde@hccnet.nl"
|
||||
},
|
||||
{
|
||||
"name": "hughsk",
|
||||
"email": "hughskennedy@gmail.com"
|
||||
},
|
||||
{
|
||||
"name": "substack",
|
||||
"email": "substack@gmail.com"
|
||||
}
|
||||
],
|
||||
"name": "ndarray-pack",
|
||||
"optionalDependencies": {},
|
||||
"readme": "ERROR: No README data found!",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git://github.com/mikolalysenko/ndarray-pack.git"
|
||||
},
|
||||
"scripts": {
|
||||
"build": "node build.js > doConvert.js",
|
||||
"test": "tap test/*.js"
|
||||
},
|
||||
"version": "1.2.1"
|
||||
}
|
||||
Reference in New Issue
Block a user