More cleanup

This commit is contained in:
Steven Silvester
2016-01-30 15:58:07 -06:00
parent 4b2692b7c0
commit 040d0475c1
+3 -2
View File
@@ -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)