Skip to content

Commit 1ddbd93

Browse files
committed
still refactoring
1 parent 20bdad5 commit 1ddbd93

File tree

3 files changed

+182
-348
lines changed

3 files changed

+182
-348
lines changed

zarr/ext.pxd

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
from numpy cimport ndarray, dtype
22

33

4-
cdef class AbstractChunk:
4+
cdef class BaseChunk:
55
cdef object _fill_value
66
cdef char *_cname
77
cdef int _clevel
@@ -16,7 +16,7 @@ cdef class AbstractChunk:
1616
cdef void put(self, char *source)
1717

1818

19-
cdef class Chunk(AbstractChunk):
19+
cdef class Chunk(BaseChunk):
2020
cdef char *_data
2121
cdef size_t _nbytes
2222
cdef size_t _blocksize
@@ -28,8 +28,10 @@ cdef class SynchronizedChunk(Chunk):
2828
cdef object _lock
2929

3030

31-
cdef class PersistentChunk(AbstractChunk):
31+
cdef class PersistentChunk(BaseChunk):
3232
cdef object _path
33+
cdef object _basename
34+
cdef object _dirname
3335
cdef dict read_header(self)
3436
cdef bytes read(self)
3537
cdef void write(self, bytes data)
@@ -40,7 +42,7 @@ cdef class SynchronizedPersistentChunk(PersistentChunk):
4042
pass
4143

4244

43-
cdef class AbstractArray:
45+
cdef class BaseArray:
4446
cdef tuple _shape
4547
cdef tuple _chunks
4648
cdef dtype _dtype
@@ -53,14 +55,14 @@ cdef class AbstractArray:
5355
cdef object _fill_value
5456
# override in sub-classes
5557
cdef void init_chunks(self)
56-
cdef AbstractChunk create_chunk(self, tuple cidx)
57-
cdef AbstractChunk get_chunk(self, tuple cidx)
58+
cdef BaseChunk create_chunk(self, tuple cidx)
59+
cdef BaseChunk get_chunk(self, tuple cidx)
5860

5961

60-
cdef class Array(AbstractArray):
62+
cdef class Array(BaseArray):
6163
pass
6264

6365

64-
cdef class PersistentArray(AbstractArray):
66+
cdef class PersistentArray(BaseArray):
6567
cdef object _mode
6668
cdef object _path

0 commit comments

Comments
 (0)