BUG: TDI/PI comparison with zero-dim array
- [x] closes #26689
- [x] tests added / passed
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [x] whatsnew entry

The long-term solution to problems of this kind will be #23853.