aboutsummaryrefslogtreecommitdiff
path: root/Python/pywarpx
diff options
context:
space:
mode:
Diffstat (limited to 'Python/pywarpx')
-rw-r--r--Python/pywarpx/Bucket.py3
-rwxr-xr-xPython/pywarpx/_libwarpx.py6
2 files changed, 5 insertions, 4 deletions
diff --git a/Python/pywarpx/Bucket.py b/Python/pywarpx/Bucket.py
index 916b030d1..5c429f530 100644
--- a/Python/pywarpx/Bucket.py
+++ b/Python/pywarpx/Bucket.py
@@ -1,3 +1,4 @@
+from six import iteritems
class Bucket(object):
"""
@@ -24,7 +25,7 @@ class Bucket(object):
def attrlist(self):
"Concatenate the attributes into a string"
result = []
- for attr, value in self.argvattrs.iteritems():
+ for attr, value in iteritems(self.argvattrs):
# --- repr is applied to value so that for floats, all of the digits are included.
# --- The strip is then needed when value is a string.
attrstring = '{0}.{1}={2} '.format(self.instancename, attr, repr(value).strip("'\""))
diff --git a/Python/pywarpx/_libwarpx.py b/Python/pywarpx/_libwarpx.py
index 9dcc879c5..0e340dfad 100755
--- a/Python/pywarpx/_libwarpx.py
+++ b/Python/pywarpx/_libwarpx.py
@@ -280,11 +280,11 @@ def add_particles(species_number=0,
if lenz == 1:
z = np.array(z)*np.ones(maxlen)
if lenux == 1:
- vx = np.array(vx)*np.ones(maxlen)
+ ux = np.array(ux)*np.ones(maxlen)
if lenuy == 1:
- vy = np.array(vy)*np.ones(maxlen)
+ uy = np.array(uy)*np.ones(maxlen)
if lenuz == 1:
- vz = np.array(vz)*np.ones(maxlen,'d')
+ uz = np.array(uz)*np.ones(maxlen,'d')
if lenattr == 1:
nattr = get_nattr()
attr = np.array(attr)*np.ones([maxlen,nattr])