[ase-users] np.array() to list conversion bug
Calcinelli, Fabio
fabio.calcinelli at tum.de
Tue Apr 10 11:57:16 CEST 2018
Good afternoon,
Running the script "Example 2: N diffusion over a step edge" from the "Image Dependent Pair Potential for improved interpolation of NEB initial guess" tutorial, in ASE 3.14.1, I ran into:
Traceback (most recent call last):
File "imagestep.py", line 23, in <module>
slab = FaceCenteredCubic(directions=[d1,d2,d3],size=(2,1,2),symbol=('Pt'),latticeconstant=3.9)
File "/data/panosetti/shared/.venvs/stretch/local/lib/python2.7/site-packages/ase/lattice/bravais.py", line 58, in __call__
self.find_directions(directions, miller)
File "/data/panosetti/shared/.venvs/stretch/local/lib/python2.7/site-packages/ase/lattice/cubic.py", line 71, in find_directions
Bravais.find_directions(self, directions, miller)
File "/data/panosetti/shared/.venvs/stretch/local/lib/python2.7/site-packages/ase/lattice/bravais.py", line 354, in find_directions
if directions == [None, None, None] and miller == [None, None, None]:
ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()
I solved the problem by adding the line:
directions[:] = [list(x) for x in directions]
after line 348 in bravais.py.
Best regards,
Fabio Calcinelli
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listserv.fysik.dtu.dk/pipermail/ase-users/attachments/20180410/765639e4/attachment.html>
More information about the ase-users
mailing list