check hasattr('__array__') to check not issparse