23
23
from .utils import file_compute , blockfile_indices
24
24
25
25
26
- class FileInterface (ABC ):
26
+ class ChunkedFileInterface (ABC ):
27
27
"""
28
28
A filesystem manager that handles transit from numpy in-memory to a
29
29
static format on disk.
@@ -50,14 +50,14 @@ def retrieve(
50
50
...
51
51
52
52
53
- class NpyFileInterface ( FileInterface ):
53
+ class NpyChunkedFileInterface ( ChunkedFileInterface ):
54
54
def __init__ (self , storage_path : str , block_size ):
55
55
self .storage_path = storage_path
56
56
self .block_size = block_size
57
57
self .format_name = "NPY"
58
58
59
- def __repr__ (self ):
60
- return f"<NpyFileInterface >"
59
+ def __repr__ (self ):
60
+ return f"<NpyChunkedFileInterface >"
61
61
62
62
def store (
63
63
self ,
@@ -120,14 +120,14 @@ def retrieve(
120
120
return np .load (fname )
121
121
122
122
123
- class H5FileInterface ( FileInterface ):
123
+ class H5ChunkedFileInterface ( ChunkedFileInterface ):
124
124
def __init__ (self , storage_path : str , block_size ):
125
125
self .storage_path = storage_path
126
126
_ = block_size
127
127
self .format_name = "h5"
128
128
129
129
def __repr__ (self ):
130
- return f"<H5FileInterface >"
130
+ return f"<H5ChunkedFileInterface >"
131
131
132
132
def store (
133
133
self ,
@@ -189,7 +189,7 @@ def __init__(
189
189
self .block_size = block_size
190
190
191
191
self .fs = (
192
- {"npy" : NpyFileInterface , "h5" : H5FileInterface }.get (
192
+ {"npy" : NpyChunkedFileInterface , "h5" : H5ChunkedFileInterface }.get (
193
193
kwargs .get ("preferred_format" , "npy" ))
194
194
)(self .storage_path , self .block_size )
195
195
0 commit comments