JSPM

isndarray

1.0.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 517
  • Score
    100M100P100Q97322F
  • License MIT

Returns boolean whether the argument is a ndarray

Package Exports

  • isndarray

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (isndarray) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

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.