A sparse matrix is parameterized by two types: an integer type for the indexes, and a value type. It is trivial to get the type of the latter (
eltype(A)), but I have not found a portable way of getting the index type that works generically across all arrays.
It can be argued that some arrays (dense arrays in particular) do not have an index type, but in fact maybe they sort of do (it’s probably the system
Is there a way to get the type parameterization of the index type of an array that doesn’t rely on the internal representation of the structure?