Skip to content

Commit 6f2787d

Browse files
committed
refactor!: switch to python 3
1 parent 3e7be69 commit 6f2787d

22 files changed

Lines changed: 33 additions & 43 deletions

doc/numpy/conf.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@
4040
master_doc = 'index'
4141

4242
# General information about the project.
43-
project = u'Boost.Python NumPy extension'
44-
copyright = u'2011, Stefan Seefeld'
43+
project = 'Boost.Python NumPy extension'
44+
copyright = '2011, Stefan Seefeld'
4545

4646
# The version info for the project you're documenting, acts as replacement for
4747
# |version| and |release|, also used in various other places throughout the
@@ -181,8 +181,8 @@
181181
# Grouping the document tree into LaTeX files. List of tuples
182182
# (source start file, target name, title, author, documentclass [howto/manual]).
183183
latex_documents = [
184-
('index', 'BoostPythonNumPy.tex', u'Boost.Python NumPy Documentation',
185-
u'Stefan Seefeld', 'manual'),
184+
('index', 'BoostPythonNumPy.tex', 'Boost.Python NumPy Documentation',
185+
'Stefan Seefeld', 'manual'),
186186
]
187187

188188
# The name of an image file (relative to this directory) to place at the top of
@@ -214,6 +214,6 @@
214214
# One entry per manual page. List of tuples
215215
# (source start file, name, description, authors, manual section).
216216
man_pages = [
217-
('index', 'boostnumpy', u'Boost.Python NumPy Documentation',
218-
[u'Stefan Seefeld'], 1)
217+
('index', 'boostnumpy', 'Boost.Python NumPy Documentation',
218+
['Stefan Seefeld'], 1)
219219
]

example/numpy/demo_gaussian.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,19 +19,19 @@
1919
z = g(x, y)
2020

2121
s = z.sum() * (r[1] - r[0])**2
22-
print "sum (should be ~ 1):", s
22+
print("sum (should be ~ 1):", s)
2323

2424
xc = (z * x).sum() / z.sum()
25-
print "x centroid (should be ~ %f): %f" % (mu[0], xc)
25+
print("x centroid (should be ~ %f): %f" % (mu[0], xc))
2626

2727
yc = (z * y).sum() / z.sum()
28-
print "y centroid (should be ~ %f): %f" % (mu[1], yc)
28+
print("y centroid (should be ~ %f): %f" % (mu[1], yc))
2929

3030
xx = (z * (x - xc)**2).sum() / z.sum()
31-
print "xx moment (should be ~ %f): %f" % (sigma[0,0], xx)
31+
print("xx moment (should be ~ %f): %f" % (sigma[0,0], xx))
3232

3333
yy = (z * (y - yc)**2).sum() / z.sum()
34-
print "yy moment (should be ~ %f): %f" % (sigma[1,1], yy)
34+
print("yy moment (should be ~ %f): %f" % (sigma[1,1], yy))
3535

3636
xy = 0.5 * (z * (x - xc) * (y - yc)).sum() / z.sum()
37-
print "xy moment (should be ~ %f): %f" % (sigma[0,1], xy)
37+
print("xy moment (should be ~ %f): %f" % (sigma[0,1], xy))

example/quickstart/script.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#! /usr/bin/env python
1+
#!/usr/bin/env python3
22
# Copyright Stefan Seefeld 2006. Distributed under the Boost
33
# Software License, Version 1.0. (See accompanying
44
# file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)

example/quickstart/test_extending.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#! /usr/bin/env python
1+
#!/usr/bin/env python3
22
# Copyright Ralf W. Grosse-Kunstleve 2006. Distributed under the Boost
33
# Software License, Version 1.0. (See accompanying
44
# file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)

example/tutorial/hello.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#! /usr/bin/env python
1+
#!/usr/bin/env python3
22
# Copyright Joel de Guzman 2002-2007. Distributed under the Boost
33
# Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt
44
# or copy at http://www.boost.org/LICENSE_1_0.txt)

test/args.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,6 @@
135135
136136
"""
137137

138-
from __future__ import print_function
139138

140139
def run(args = None):
141140
import sys

test/dict.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@
2929
default
3030
"""
3131

32-
from __future__ import print_function
3332

3433
def run(args = None):
3534
import sys

test/iterator.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,6 @@
6262
1 3 5 7
6363
'''
6464

65-
from __future__ import print_function
6665

6766
def run(args = None):
6867
import sys

test/list.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,6 @@
102102
['y', 'x', 'o', 'l', 'l', 'h', 'e', '.']
103103
'''
104104

105-
from __future__ import print_function
106105

107106
def run(args = None):
108107
import sys

test/map_indexing_suite.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,6 @@
227227
228228
'''
229229

230-
from __future__ import print_function
231230

232231
def run(args = None):
233232
import sys

0 commit comments

Comments
 (0)