diff options
author | Nathan Goldbaum <nathan.goldbaum@gmail.com> | 2023-05-13 00:05:07 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-12 23:05:07 -0700 |
commit | 25908cacd19915bf3ddd659c28be28a41bd97a54 (patch) | |
tree | 032aba9a7b569fcd1a58348e849aa6a73a3a54a2 /numpy/lib/npyio.py | |
parent | 6d9f1ff8b9aa5fb0b06fc053ffc00352b37cc80e (diff) | |
download | numpy-25908cacd19915bf3ddd659c28be28a41bd97a54.tar.gz |
BUG: properly handle tuple keys in NpZFile.__getitem__ (#23757)
* BUG: properly handle tuple keys in NpZFile.__getitem__
* TST: test tuple rendering specifically.
---------
Co-authored-by: Ross Barnowski <rossbar@berkeley.edu>
Diffstat (limited to 'numpy/lib/npyio.py')
-rw-r--r-- | numpy/lib/npyio.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/numpy/lib/npyio.py b/numpy/lib/npyio.py index 22fb0eb7d..339b1dc62 100644 --- a/numpy/lib/npyio.py +++ b/numpy/lib/npyio.py @@ -260,7 +260,7 @@ class NpzFile(Mapping): else: return self.zip.read(key) else: - raise KeyError("%s is not a file in the archive" % key) + raise KeyError(f"{key} is not a file in the archive") def __contains__(self, key): return (key in self._files or key in self.files) |