isndarray
Returns boolean whether the argument is a ndarray
Last updated 13 years ago by shama .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install isndarray 
SYNC missed versions from official npm registry.

isndarray

Returns boolean whether the argument is a ndarray.

example

var isnd = require('isndarray')
var ndarray = require('ndarray')

true === isnd(ndarray(new Int8Array(32 * 32), [32, 32]))
true === isnd(ndarray(new Float64Array(32)))
true === isnd(ndarray(new Uint32Array(4 * 4 * 4), [4, 4, 4]))

false === isnd(new Int8Array(32 * 32), [32, 32])
false === isnd(new View3dtrick16())
false === isnd(new View3dint8())

function View3dtrick16() {
  this.dtype = 'fake'
}
function View3dint8() {
  /* no .dtype */
}

API

isndarray(arr) will return boolean whether an ndarray.

install

With npm do:

npm install isndarray

Use browserify to require('isndarray').

release history

  • 0.1.0 - initial release

license

Copyright (c) 2013 Kyle Robinson Young
Licensed under the MIT license.

Current Tags

  • 1.0.0                                ...           latest (11 years ago)

2 Versions

  • 1.0.0                                ...           11 years ago
  • 0.1.0                                ...           13 years ago
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 1
Last Month 1
Dependencies (0)
None
Dev Dependencies (2)
Dependents (2)

Copyright 2013 - present © cnpmjs.org | Home |