enhance scalar rank check
To enhance speed/stability of scalar rank checks, don't bother to check shape as rank alone is a sufficient check for scalars.
To enhance speed/stability of scalar rank checks, don't bother to check shape as rank alone is a sufficient check for scalars.