Since `rank` is deprecated, might as well update this to "have the same number of dimensions". Might have to put that on the next line to fit the line length restriction:
```
        raise ValueError(
            " observation and code should have the same number of dimensions")
```