fix dtype handling in linop_from_ndarray
add test suite for aslinearoperator-like function