see https://github.com/scipy/scipy/issues/23067
see scipy/scipy#23067