Fix space bug

There was a bug in `IndexSpace.np_format_as` which made it raise an error when trying to convert an `IndexSpace` to an identical `IndexSpace`. I fixed it and added unit tests to make sure it doesn't break again.