KDB bugs
Posted: Thu Jul 26, 2018 10:09 pm
Hi all,
I found 2 bugs in KDB and found a fix.
In kdb.py, on line 78:
In local_db.py, on line 156:
A better solution is probably to try type casting the inputs to ndarrays and if they pass, check to see if they have the right dimensions. But I'm new around here and don't want raise a kerfuffle.
Best,
-Mike
I found 2 bugs in KDB and found a fix.
In kdb.py, on line 78:
Code: Select all
#if ibox == None: #old check, raises ValueError on ndarrays
if type(ibox) != numpy.ndarray and type(ibox) != list and type(ibox) != tuple: # my fix
ibox = numpy.linalg.inv(box)
vdir = numpy.dot(r, ibox)
Code: Select all
# if mode = None, create array of zeros.
#if mode == None: #old check, raises ValueError on ndarrays
if type(mode) != numpy.ndarray and type(mode) != list and type(mode) != tuple: # my fix
mode = numpy.zeros((len(atoms),3))
# get important data from ase.Atoms instance
Best,
-Mike