xref scipy/scipy#14901 Splits single if statement into two to avoid apparent clang short-circuit bug on M1 Mac platforms. Co-authored-by: Matt Borland <matt@mattborland.com>