[ase-users] tuple in atoms.center ?
Matt Addicoat
madd.cluster at gmail.com
Thu May 1 16:44:23 CEST 2014
Hi,
In the center function, if no axis is passed, a tuple, (0,1,2) is
created. If you do pass as axis, the else block is clearly meaning to
also create a tuple from whatever is passed as the axes parameter.
However when I pass a list; [0, 1], it actually creates a tuple of one
element; ([0, 1],) and the subsequent np.dot fails.
Changing the line:
axes = (axis,)
to
axes = tuple(axis)
creates the expected tuple; (0,1) and everything else appears to work fine.
Is this a minor bug? If not, how should one pass the axes to this function?
Warm Regards,
Matt
More information about the ase-users
mailing list