MAINT: improve compatibility with old scipy versions, but some complex number are sneaking in and causing tests to fail