Skip to content

Commit 7d593b8

Browse files
committed
Organize vlen's imports
* Global `cimport`'s first * Start with core modules `cython`, `libc`, etc. * Add extensions `cpython` & `numpy` * Internal extensions * Then `import`s similarly grouped
1 parent 9b289c6 commit 7d593b8

File tree

1 file changed

+12
-7
lines changed

1 file changed

+12
-7
lines changed

numcodecs/vlen.pyx

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,11 @@
55
# cython: language_level=3
66

77

8-
import cython
98
cimport cython
10-
from numpy cimport ndarray
11-
import numpy as np
12-
from .abc import Codec
13-
from .compat import ensure_contiguous_ndarray
9+
10+
from libc.stdint cimport uint8_t
11+
from libc.string cimport memcpy
12+
1413
from cpython.buffer cimport PyBuffer_IsContiguous
1514
from cpython.bytearray cimport (
1615
PyByteArray_AS_STRING,
@@ -28,10 +27,16 @@ from cpython.unicode cimport (
2827
PyUnicode_Check,
2928
PyUnicode_FromStringAndSize,
3029
)
31-
from libc.stdint cimport uint8_t
32-
from libc.string cimport memcpy
30+
31+
from numpy cimport ndarray
32+
3333
from ._utils cimport store_le32, load_le32
3434

35+
import numpy as np
36+
37+
from .abc import Codec
38+
from .compat import ensure_contiguous_ndarray
39+
3540

3641
# 4 bytes to store number of items
3742
cdef Py_ssize_t HEADER_LENGTH = 4

0 commit comments

Comments
 (0)