mirror of
https://github.com/wassname/scikit-image.git
synced 2026-06-27 19:48:43 +08:00
More cleanup
This commit is contained in:
@@ -36,7 +36,7 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
import cython
|
||||
import numpy as np
|
||||
import heap
|
||||
import warnings
|
||||
from .._shared.utils import warn
|
||||
|
||||
cimport numpy as cnp
|
||||
cimport heap
|
||||
@@ -304,7 +304,8 @@ cdef class MCP:
|
||||
self.flat_costs = costs.astype(FLOAT_D, copy=False).ravel('F')
|
||||
except TypeError:
|
||||
self.flat_costs = costs.astype(FLOAT_D).flatten('F')
|
||||
warnings.warn('Upgrading NumPy should decrease memory usage and increase speed.', Warning, stacklevel=2)
|
||||
warn('Upgrading NumPy should decrease memory usage and increase'
|
||||
' speed.')
|
||||
size = self.flat_costs.shape[0]
|
||||
self.flat_cumulative_costs = np.empty(size, dtype=FLOAT_D)
|
||||
self.dim = len(costs.shape)
|
||||
|
||||
Reference in New Issue
Block a user