Commit 85e1fa0c authored by Stefan Behnel's avatar Stefan Behnel

simplify some code

parent e8c8482f
...@@ -960,7 +960,6 @@ cdef memoryview_fromslice({{memviewslice_name}} memviewslice, ...@@ -960,7 +960,6 @@ cdef memoryview_fromslice({{memviewslice_name}} memviewslice,
bint dtype_is_object): bint dtype_is_object):
cdef _memoryviewslice result cdef _memoryviewslice result
cdef int i
if <PyObject *> memviewslice.memview == Py_None: if <PyObject *> memviewslice.memview == Py_None:
return None return None
...@@ -995,8 +994,8 @@ cdef memoryview_fromslice({{memviewslice_name}} memviewslice, ...@@ -995,8 +994,8 @@ cdef memoryview_fromslice({{memviewslice_name}} memviewslice,
break break
result.view.len = result.view.itemsize result.view.len = result.view.itemsize
for i in range(ndim): for length in result.view.shape[:ndim]:
result.view.len *= result.view.shape[i] result.view.len *= length
result.to_object_func = to_object_func result.to_object_func = to_object_func
result.to_dtype_func = to_dtype_func result.to_dtype_func = to_dtype_func
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment