// As every symbol in the matrix should be either in the namespace or// the specifiers dictionary, it should be sufficient to just check for// the presence of any non-constant specifiers.
symbols = reduce(operator.add, (el.atoms() for el in matrix))// Only check true symbols, not numbers
symbols = set([str(symbol) for symbol in symbols
ifisinstance(symbol, Symbol)])
for symbol in symbols: