-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from jonnor/npz-support
Implement .npz support
- Loading branch information
Showing
5 changed files
with
2,137 additions
and
0 deletions.
There are no files selected for viewing
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
|
||
import zipfile | ||
print('zipfile', zipfile.__file__) | ||
|
||
import npyfile | ||
|
||
path = 'examples/digits/digits_combined.npz' | ||
with zipfile.ZipFile(path) as archive: | ||
|
||
files = archive.namelist() | ||
files = [ f for f in files if f.endswith('.npy') ] | ||
print(files) | ||
|
||
for name in files: | ||
f = archive.open(name) | ||
s, v = npyfile.load(f) | ||
print('ss', s, len(v)) |
Oops, something went wrong.