Skip to content

Commit f380305

Browse files
Merge pull request #2 from pgdr/master
Add travis, requirements, and Python object
2 parents 12a66c0 + aba39c5 commit f380305

File tree

8 files changed

+26
-7
lines changed

8 files changed

+26
-7
lines changed

.travis.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
dist: trusty
2+
language: python
3+
sudo: required
4+
5+
addons:
6+
apt:
7+
packages:
8+
- python-numpy
9+
- python-pandas
10+
- python-scipy
11+
12+
script:
13+
- sudo pip install nose
14+
- export PYTHONPATH=$PYTHONPATH:.
15+
- python setup.py build
16+
- python setup.py test

pybobyqa/controller.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
EXIT_LINALG_ERROR = -3 # error, linalg error (singular matrix encountered)
5555

5656

57-
class ExitInformation:
57+
class ExitInformation(object):
5858
def __init__(self, flag, msg_details):
5959
self.flag = flag
6060
self.msg = msg_details
@@ -92,7 +92,7 @@ def able_to_do_restart(self):
9292
return "sufficiently small" not in self.msg # restart for rho=rhoend and noise level termination
9393

9494

95-
class Controller:
95+
class Controller(object):
9696
def __init__(self, objfun, x0, f0, f0_nsamples, xl, xu, npt, rhobeg, rhoend, nf, nx, maxfun, params, scaling_changes):
9797
self.objfun = objfun
9898
self.maxfun = maxfun

pybobyqa/diagnostic_info.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
ITER_SAFETY = "Safety" # safety step taken (||s|| too small compared to rho)
4747

4848

49-
class DiagnosticInfo:
49+
class DiagnosticInfo(object):
5050
def __init__(self):
5151
self.data = {}
5252
# Initialise everything we want to store

pybobyqa/hessian.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
__all__ = ['Hessian']
3636

3737

38-
class Hessian:
38+
class Hessian(object):
3939
def __init__(self, n, vals=None):
4040
self.n = n
4141
if vals is None:

pybobyqa/model.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
__all__ = ['Model']
4242

4343

44-
class Model:
44+
class Model(object):
4545
def __init__(self, npt, x0, f0, xl, xu, f0_nsamples, n=None, abs_tol=-1e20, precondition=True):
4646
if n is None:
4747
n = len(x0)

pybobyqa/params.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
__all__ = ['ParameterList']
3232

3333

34-
class ParameterList:
34+
class ParameterList(object):
3535
def __init__(self, n, npt, maxfun, objfun_has_noise=False):
3636
self.params = {}
3737
# Rounding error constant (for shifting base)

pybobyqa/solver.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444

4545

4646
# A container for the results of the optimization routine
47-
class OptimResults:
47+
class OptimResults(object):
4848
def __init__(self, xmin, fmin, gradmin, hessmin, nf, nx, nruns, exit_flag, exit_msg):
4949
self.x = xmin
5050
self.f = fmin

requirements.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
numpy>=1.11
2+
scipy>=0.18
3+
pandas>=0.17

0 commit comments

Comments
 (0)