UNPKG

292 BJavaScriptView Raw
1'use strict'
2
3/**
4 * Test whether a value is a Matrix
5 * @param {*} x
6 * @returns {boolean} returns true with input is a Matrix
7 * (like a DenseMatrix or SparseMatrix)
8 */
9module.exports = function isMatrix (x) {
10 return (x && x.constructor.prototype.isMatrix) || false
11}