Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
PyART CyLP to cylp patch
From b71983c189ebdeb88c1d0f9c4ea6cf286a968d34 Mon Sep 17 00:00:00 2001
From: Jonathan Helmus <jjhelmus@gmail.com>
Date: Thu, 19 Dec 2013 16:41:59 -0600
Subject: [PATCH] MAINT: renamed CyLP to cylp
---
pyart/correct/phase_proc.py | 24 ++++++++++++------------
pyart/correct/tests/test_phase_proc.py | 2 +-
2 files changed, 13 insertions(+), 13 deletions(-)
diff --git a/pyart/correct/phase_proc.py b/pyart/correct/phase_proc.py
index c277fbd..14c6dff 100644
--- a/pyart/correct/phase_proc.py
+++ b/pyart/correct/phase_proc.py
@@ -541,8 +541,8 @@ def construct_A_matrix(n_gates, filt):
side_pad = (filter_length - 1) / 2
M_matrix = np.bmat(
[np.zeros([n_gates-filter_length + 1, side_pad], dtype=float),
- M_matrix_middle, np.zeros([n_gates-filter_length+1, side_pad],
- dtype=float)])
+ M_matrix_middle, np.zeros(
+ [n_gates-filter_length+1, side_pad], dtype=float)])
Z_matrix = np.zeros([n_gates - filter_length + 1, n_gates])
return np.bmat([[Identity, -1.0 * Identity], [Identity, Identity],
[Z_matrix, M_matrix]])
@@ -621,8 +621,8 @@ def LP_solver_cvxopt(A_Matrix, B_vectors, weights, solver='glpk'):
See Also
--------
LP_solver_pyglpk : Solve LP problem using the PyGLPK module.
- LP_solver_cylp : Solve LP problem using the CyLP module.
- LP_solver_cylp_mp : Solve LP problem using the CyLP module
+ LP_solver_cylp : Solve LP problem using the cylp module.
+ LP_solver_cylp_mp : Solve LP problem using the cylp module
using multi processes.
"""
@@ -682,8 +682,8 @@ def LP_solver_pyglpk(A_Matrix, B_vectors, weights, it_lim=7000, presolve=True,
See Also
--------
LP_solver_cvxopt : Solve LP problem using the CVXOPT module.
- LP_solver_cylp : Solve LP problem using the CyLP module.
- LP_solver_cylp_mp : Solve LP problem using the CyLP module
+ LP_solver_cylp : Solve LP problem using the cylp module.
+ LP_solver_cylp_mp : Solve LP problem using the cylp module
using multi processes.
"""
@@ -750,8 +750,8 @@ def solve_cylp(model, B_vectors, weights, ray, chunksize):
LP_solver_cylp : Single Process Solver.
"""
- from CyLP.cy.CyClpSimplex import CyClpSimplex
- from CyLP.py.modeling.CyLPModel import CyLPModel, CyLPArray
+ from cylp.cy.CyClpSimplex import CyClpSimplex
+ from cylp.py.modeling.CyLPModel import CyLPModel, CyLPArray
n_gates = weights.shape[1]/2
n_rays = B_vectors.shape[0]
@@ -811,8 +811,8 @@ def LP_solver_cylp_mp(A_Matrix, B_vectors, weights, really_verbose=False,
process.
"""
- from CyLP.cy.CyClpSimplex import CyClpSimplex
- from CyLP.py.modeling.CyLPModel import CyLPModel, CyLPArray
+ from cylp.cy.CyClpSimplex import CyClpSimplex
+ from cylp.py.modeling.CyLPModel import CyLPModel, CyLPArray
import multiprocessing as mp
n_gates = weights.shape[1]/2
@@ -908,8 +908,8 @@ def LP_solver_cylp(A_Matrix, B_vectors, weights, really_verbose=False):
LP_solver_pyglpk : Solve LP problem using the PyGLPK module.
"""
- from CyLP.cy.CyClpSimplex import CyClpSimplex
- from CyLP.py.modeling.CyLPModel import CyLPModel, CyLPArray
+ from cylp.cy.CyClpSimplex import CyClpSimplex
+ from cylp.py.modeling.CyLPModel import CyLPModel, CyLPArray
n_gates = weights.shape[1]/2
n_rays = B_vectors.shape[0]
diff --git a/pyart/correct/tests/test_phase_proc.py b/pyart/correct/tests/test_phase_proc.py
index 8a76841..53d666b 100644
--- a/pyart/correct/tests/test_phase_proc.py
+++ b/pyart/correct/tests/test_phase_proc.py
@@ -28,7 +28,7 @@ except ImportError:
try:
- import CyLP.cy
+ import cylp.cy
cylp_available = True
except ImportError:
cylp_available = False
--
1.8.4.3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment