mirror of
https://github.com/wassname/scikit-image.git
synced 2026-08-06 13:30:21 +08:00
Speed up memory views in line drawing function
This commit is contained in:
@@ -71,8 +71,8 @@ def line(Py_ssize_t y, Py_ssize_t x, Py_ssize_t y2, Py_ssize_t x2):
|
||||
sx, sy = sy, sx
|
||||
d = (2 * dy) - dx
|
||||
|
||||
cdef Py_ssize_t[:] rr = np.zeros(int(dx) + 1, dtype=np.intp)
|
||||
cdef Py_ssize_t[:] cc = np.zeros(int(dx) + 1, dtype=np.intp)
|
||||
cdef Py_ssize_t[::1] rr = np.zeros(int(dx) + 1, dtype=np.intp)
|
||||
cdef Py_ssize_t[::1] cc = np.zeros(int(dx) + 1, dtype=np.intp)
|
||||
|
||||
for i in range(dx):
|
||||
if steep:
|
||||
|
||||
Reference in New Issue
Block a user