SparseArrayQ
SparseArrayQ[s]
yields True if s is a valid SparseArray object and False otherwise.
Examples
open allclose allBasic Examples (1)
Test whether an object is a valid SparseArray object:
Scope (4)
SparseArrayQ works with sparse vectors:
SparseArrayQ works with sparse arrays of any depth:
SparseArrayQ works with large sparse arrays:
SparseArrayQ gives False for anything that is not a SparseArray:
Properties & Relations (2)
When SparseArrayQ is True, ArrayQ will also be True but not the converse:
SparseArrayQ is equivalent to (ArrayQ[#] && MatchQ[#,_SparseArray])&:
Text
Wolfram Research (2021), SparseArrayQ, Wolfram Language function, https://reference.wolfram.com/language/ref/SparseArrayQ.html.
CMS
Wolfram Language. 2021. "SparseArrayQ." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/SparseArrayQ.html.
APA
Wolfram Language. (2021). SparseArrayQ. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/SparseArrayQ.html