Replies: 2 comments
-
There is no such method. Maybe intereresting to implement. You can iterate over a matrix using function includes(matrix, value) {
let found = false
matrix.forEach(item => {
if (!found && math.equal(item, value)) {
found = true
}
})
return found
}
// usage:
const m = math.matrix([[1, 2], [3, 4]])
includes(m, 3) // true
includes(m, 5) // false
includes(m, math.bignumber(3)) // true |
Beta Was this translation helpful? Give feedback.
0 replies
-
Thank you. Good advice. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Good day.
Do we have a function for simple check if a matrix has some value?
M.has(1), M.includes(1)...
Beta Was this translation helpful? Give feedback.
All reactions